[Gambas-user] Reading nordic characters from file

Benoit Minisini gambas at ...1...
Wed Mar 15 20:17:02 CET 2006


On Wednesday 15 March 2006 18:25, Markku Määttänen wrote:
> I have Mandriva Linux 2006.0 cooker and my Gambas version is 1.0.14
>
> I try to run this example:
>
> PUBLIC SUB Button1_Click()
>
> myLine AS String
> myFile AS File
>
> OPEN "/home/mm/Gambas/test.txt" FOR READ AS myFile
> WHILE NOT Eof(myFile)
>   LINE INPUT #myFile, myLine
>   TextLabel1.Text= TextLabel1.Text & "<br>" & myLine
> WEND
> CLOSE myFile
> END
>
> Test.txt file are two lines:
> abcdefghijklmnopqrstuvxyzåäö
> ABCDEFGHIJKLMNOPQRSTUVXYZÅÄÖ
>
> TextLabel1 result:
> abcdefghijklmnopqrstuvxyz
> ABCDEFGHIJKLMNOPQRSTUVXYZ
>
> Why does LINE INPUT not read nordic characters “åäö” ?
>
> Ubuntu 5.10 / Gambas 1.0.3 this example works well!
>

Can you send me your text file?

-- 
Benoit Minisini





More information about the User mailing list