Page 1 of 1

readln() and the "£" sign

Posted: December 14th, 2005, 9:34 am
by teedoubleyou
When using readln(), if trying to read in a text file of over 50 lines, I get an interesting problem.

The readln() reads the string up until but not including the £ character.

Anyone experienced this before? And if so, any ideas? I do want to read in the whole string.

Posted: December 17th, 2005, 4:49 am
by Mylenium
Maybe unicode related. Have you some catch to ignore unknown characters? I also think there is some special function you need to define to make use of special characters. Sorry I'm not of more help. Haven't done scripting in a while.

Mylenium

readln() and the "£" sign

Posted: December 17th, 2005, 1:24 pm
by redefinery
I can't repro the problem with a simple text file with the £ character in it. Is there some other special/binary character on the same line?

Maybe setting the File encoding attribute to "BINARY" or something appropriate for the encoding of the file would help?

Jeff

Posted: December 19th, 2005, 8:41 am
by teedoubleyou
The file is a tab delimited excel sheet in txt format.

Encountering a £ sign where the txt file only contains 1 line doesn't seem to be a problem, it only occurs when there seems to be over 20 lines of text. :(

readln() and the "£" sign

Posted: December 19th, 2005, 10:32 am
by redefinery
My original test was with a text file (not including tabs) in which the £ sign was on line 50. I added some tabs to the file and still don't have a problem. Maybe you can post some of your code or sample file?

Jeff