| View previous topic :: View next topic |
| Author |
Message |
Caribou Voice
Joined: 15 Apr 2004 Posts: 28 Location: France
|
Posted: Sun Feb 26, 2006 2:00 am Post subject: Why a " ² " become " ? " |
|
|
Hello, i have a weird bug about a character, the " ² ", when i write it in a text file, it make it " ? ", and i don't really understand why, i can't find any thread about this, maybe i didn't used the correct key-words to find it but well.
Someone have any clue about this ?
I guess the " ² " isn't the only character who is affected. |
|
| Back to top |
|
 |
De Kus Revered One

Joined: 15 Dec 2002 Posts: 1361 Location: Germany
|
Posted: Sun Feb 26, 2006 10:49 am Post subject: |
|
|
read about character tables and character encodings. _________________ De Kus
StarZ|De_Kus, De_Kus or DeKus on IRC
Copyright © 2005-2009 by De Kus - published under The MIT License
Love hurts, love strengthens... |
|
| Back to top |
|
 |
Caribou Voice
Joined: 15 Apr 2004 Posts: 28 Location: France
|
Posted: Sun Feb 26, 2006 3:40 pm Post subject: |
|
|
Thanks De Kus,
I did a search about encoding and i find out a solution, i used fconfigure command, i don't really know where to had it, so i made it just before writing in my text file. and now when i open the .txt file i got the " ² " instead of " ? "
| Code: | if {![catch {set fileWri [open nick2.txt w]}]} {
fconfigure $fileWri -encoding binary
puts $fileWri "$arg"
close $fileWri
} |
But re-using fconfigure each times i write in my .txt is the right thing to do i hope? |
|
| Back to top |
|
 |
De Kus Revered One

Joined: 15 Dec 2002 Posts: 1361 Location: Germany
|
Posted: Sun Feb 26, 2006 4:31 pm Post subject: |
|
|
yes, unless you can change the default encoding thats used. I dont know if the default is the eggdrops default or the systems default. Because eggdrop should use iso-8659-1 which supports these characters your shell probably uses us-ascii which is not that good imho. But maybe its also strict UTF-8 which of course does not recognize single byte values over 127. _________________ De Kus
StarZ|De_Kus, De_Kus or DeKus on IRC
Copyright © 2005-2009 by De Kus - published under The MIT License
Love hurts, love strengthens... |
|
| Back to top |
|
 |
|