Code: Select all
ã
Code: Select all
ã
Alchera wrote:Are you sending these characters to an HTML page or retrieving them?
Sending them will require you to use the numeric code for them. The above character is produced in HTML by usingORCode: Select all
ã
and you will have to write your TCL script accordingly.Code: Select all
ã
Code: Select all
puts $arqvot "ã"
I´m have change all special characters (example: é ã ) in my tcl for this codes of the page http://www.draac.com/special.html ?Alchera wrote:Something like the above to have the special characters added to your HTML. This link will give you a full list of the special characters and their respective codes.Code: Select all
puts $arqvot "ã"
Code: Select all
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=ISO-8859-1">
I DON´T BELIEVE!!!Alchera wrote:I had a similar problem with TCL scripts in French on one particular shell after they upgraded to RH EL .. weird characters in the channel when using my French language bots and then all of a sudden it fixed itself.
So one solution is to contact your shell admin and explain the problem and see what character set they have set, ISO-8859-1 for instance. Normally Linux (and Windows Servers) install with everything properly set to handle the special characters but some times things to go awry and are unnoticed because English is never a problem.
Do you set a meta tag in your HTML with regard to character sets?What I have previously posted will definitely solve your problem as long as you edit your TCL script (tedious as it may be) so that special characters are written to your HTML file and the page will display correctly for all to see.Code: Select all
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=ISO-8859-1">
As a side note, for cross browser compatibilty, the convention is to use those character codes in all HTML documents when using special characters.
Code: Select all
proc cleanup {str} {
set str [string map {"ã" "ã"} $str]
set str [string map {"Ã" "Ã"} $str]
#....and so on....
return $str
}
Code: Select all
set str [encoding convertfrom identity $str]
HelloAlchera wrote:jones: Could you please paste your web site so I can see for myself the problem?
set str [encoding convertfrom identity $str]gb wrote:non-latin characters will appear different on different systems, depending on their locale and encoding settings, so you're best way to do this will be to replace any special characters with the corresponding html code
You can find a list of them here:
http://www.draac.com/special.html
If you find it tidious to replace those manually then something like this would do it for you...
Code: Select all
proc cleanup {str} { set str [string map {"ã" "ã"} $str] set str [string map {"Ã" "Ã"} $str] #....and so on.... return $str }