Guest_imported
New member
- Jan 1, 1970
- 0
Hi..
I´m hopeing someone can help me!!
I am using the same two procs in different unix machines, with the same two files which contain unicode characters (the character in question is the ° char.)
However TCL 8.0 and TCL 8.3 seems to treat these characters differently.
In Tcl 8.0 the character, when read in from a file, echos the file contents as they are.
>set fh [open unicodefile]
>read $fh
°Black
When I try to do this in Tcl 8.3 however, when I echo the contents, I get an extra character (Â)
>set fh [open unicodefile]
>read $fh
°Black
Does anyone know why this is occuring??? I'm running both on Sun, and have checked that all the locale environment variables are the same (i have tried setting LANG to be both en_US and en_UK)
I have also tried to fconfigure the encoding type in 8.3 before I read it in as such:
>set fh [open unicodefile]
>fconfigure $fh -encoding iso8859-1
>read $fh
°Black
To be sure that this actually did something I also tried to fconfigure the encoding to be everything from 1 - 9, and iso8859-5 gave me a different result (so at least I know that it is doing something!!)
If anyone can please help, or at least point me into a direction to look.. i've tried every search engine I can find, but havent been able to find any answers...I really need this to work on Tcl 8.3 because we are upgdrading our systems to work on Tcl 8.3...
thanks alot
Isa
I´m hopeing someone can help me!!
I am using the same two procs in different unix machines, with the same two files which contain unicode characters (the character in question is the ° char.)
However TCL 8.0 and TCL 8.3 seems to treat these characters differently.
In Tcl 8.0 the character, when read in from a file, echos the file contents as they are.
>set fh [open unicodefile]
>read $fh
°Black
When I try to do this in Tcl 8.3 however, when I echo the contents, I get an extra character (Â)
>set fh [open unicodefile]
>read $fh
°Black
Does anyone know why this is occuring??? I'm running both on Sun, and have checked that all the locale environment variables are the same (i have tried setting LANG to be both en_US and en_UK)
I have also tried to fconfigure the encoding type in 8.3 before I read it in as such:
>set fh [open unicodefile]
>fconfigure $fh -encoding iso8859-1
>read $fh
°Black
To be sure that this actually did something I also tried to fconfigure the encoding to be everything from 1 - 9, and iso8859-5 gave me a different result (so at least I know that it is doing something!!)
If anyone can please help, or at least point me into a direction to look.. i've tried every search engine I can find, but havent been able to find any answers...I really need this to work on Tcl 8.3 because we are upgdrading our systems to work on Tcl 8.3...
thanks alot
Isa