Read file with accented characters ?

Zax zax at tripoy.com
Wed May 24 09:23:50 EDT 2006


Well, after more tests with different text files, it appears that my
solution doesn't work in some cases :(

Does anybody have a better idea ?

> I tried this function but it returns wrong result with Rev 2.5.1
> 
> So finally I will use the following process:
> 
>     open file MyFile for binary read
>     if the result <> "" then
>     read from file MyFile  until EOF
>     close file MyFile
>     put the number of lines in it into NumOfLines
>     open file MyFile for text read
>     read from file MyFile until EOF
>     close file MyFile
>     if the number of lines in it <> NumOfLines then get IsoToMac(it)
> 
> It opens the text file twice - once as binary as the other as text - and
> compares the number of lines. If the number of lines is different, then it's
> not a pure Mac text file, so I have to use IsoToMac() to fix accented
> characters.

----------------------
Zax 





More information about the use-livecode mailing list