This is the new home of the egghelp.org community forum.
All data has been migrated (including user logins/passwords) to a new phpBB version.


For more information, see this announcement post. Click the X in the top right-corner of this box to dismiss this message.

word: não stay this: não (why???!?!?)

Old posts that have not been replied to for several years.
j
jones
Voice
Posts: 33
Joined: Fri Jun 25, 2004 12:36 am

word: não stay this: não (why???!?!?)

Post by jones »

my tcl make a HTML but the word in this html should be: não
but stay this: não

because this ?
help-me!!!!!!!!!
g
greenbear
Owner
Posts: 733
Joined: Mon Sep 24, 2001 8:00 pm
Location: Norway

Post by greenbear »

What encoding are you using for the files ?
j
jones
Voice
Posts: 33
Joined: Fri Jun 25, 2004 12:36 am

Post by jones »

gb wrote:What encoding are you using for the files ?
Where I see what encoding i´m using?
thanks
User avatar
Alchera
Revered One
Posts: 3344
Joined: Mon Aug 11, 2003 12:42 pm
Location: Ballarat Victoria, Australia
Contact:

Re:word: não stay this: não (why???!?!?)

Post by Alchera »

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 using

Code: Select all

ã
OR

Code: Select all

ã
and you will have to write your TCL script accordingly. :)
Add [SOLVED] to the thread title if your issue has been.
Search | FAQ | RTM
j
jones
Voice
Posts: 33
Joined: Fri Jun 25, 2004 12:36 am

Re:word: não stay this: não (why???!?!?)

Post by jones »

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 using

Code: Select all

ã
OR

Code: Select all

ã
and you will have to write your TCL script accordingly. :)

my tcl code make a file.html
exemple of my tcl code:

puts $arqvot "<table border=1 bgcolor=$color(voteinfo)><tr><td>"
puts $arqvot "<table border=0 cellspacing=1>"
puts $arqvot "<tr><td><strong><font face="Verdana"><small>Titulo: <td><input name=titulo value="[aspas2apos $titulo]" size=55 onfocus="titulo.blur()"><br>"


HELP ME
PLEASE!!!
User avatar
Alchera
Revered One
Posts: 3344
Joined: Mon Aug 11, 2003 12:42 pm
Location: Ballarat Victoria, Australia
Contact:

Post by Alchera »

Code: Select all

puts $arqvot "ã"
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. :)
Add [SOLVED] to the thread title if your issue has been.
Search | FAQ | RTM
j
jones
Voice
Posts: 33
Joined: Fri Jun 25, 2004 12:36 am

Post by jones »

Alchera wrote:

Code: Select all

puts $arqvot "ã"
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. :)
I´m have change all special characters (example: é ã ) in my tcl for this codes of the page http://www.draac.com/special.html ?

You have other thing to correct this problem? this change is very work!

*** INTERESTING: In my old server shell account this TCL it functioned normal but in my new server of shell account i´m have this problem!!!
* The only difference is that: In my old shell account is freebsd and i run my tcl in eggdrop1.1.5 and in my current shell account is linux and i run the tcl in eggdrop1.6.15.

* And that: i´m have to add new line configuration in eggdrop.conf for the bot run in eggdrop1.6.15 because in eggdrop1.1.5 have few lines connfiguration compared with eggdrop1.6.15.

I was clearly?
THIS DO SOMETHING DIFFERENCE ???

HELP-ME PLEASE!!! THANKS!
User avatar
Alchera
Revered One
Posts: 3344
Joined: Mon Aug 11, 2003 12:42 pm
Location: Ballarat Victoria, Australia
Contact:

Post by Alchera »

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?

Code: Select all

<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=ISO-8859-1">
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.

As a side note, for cross browser compatibilty, the convention is to use those character codes in all HTML documents when using special characters.
Add [SOLVED] to the thread title if your issue has been.
Search | FAQ | RTM
j
jones
Voice
Posts: 33
Joined: Fri Jun 25, 2004 12:36 am

Post by jones »

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?

Code: Select all

<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=ISO-8859-1">
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.

As a side note, for cross browser compatibilty, the convention is to use those character codes in all HTML documents when using special characters.
I DON´T BELIEVE!!!
this code not correct this problem!

*** Part of code in my TCL to make HTML:
inicio = begin of html
fim = end of html

proc addcode {arq type arg1} {
global color background
if {$type=="inicio"} {
puts $arq "<html>"
puts $arq " <head>"
puts $arq " <title>$arg1</title>"
puts $arq "<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=ISO-8859-1">"
puts $arq " </head>"
puts $arq "<body bgcolor=$color(bgcolor) leftmargin="0" bgproperties="fixed" background=$background>"
}
if {$type=="fim"} {
puts $arq "</body>"
puts $arq "</html>"
}
if {$type=="nenhuma"} {
puts $arq "<BR><BR><font size=4 face=verdana color=green><b><center>Nenhuma votação disponível</center></font></b>"
}
}

it´s correct ok?
HELP-ME PLEASE!
User avatar
Alchera
Revered One
Posts: 3344
Joined: Mon Aug 11, 2003 12:42 pm
Location: Ballarat Victoria, Australia
Contact:

Post by Alchera »

jones: Could you please paste your web site so I can see for myself the problem?
Add [SOLVED] to the thread title if your issue has been.
Search | FAQ | RTM
g
greenbear
Owner
Posts: 733
Joined: Mon Sep 24, 2001 8:00 pm
Location: Norway

Post by greenbear »

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
}
User avatar
Alchera
Revered One
Posts: 3344
Joined: Mon Aug 11, 2003 12:42 pm
Location: Ballarat Victoria, Australia
Contact:

Post by Alchera »

jones: I also need to know what language you're using. :)
Add [SOLVED] to the thread title if your issue has been.
Search | FAQ | RTM
g
greenbear
Owner
Posts: 733
Joined: Mon Sep 24, 2001 8:00 pm
Location: Norway

Post by greenbear »

eggdrop does a terrible job with unicode, so I'd stay away from it if possible.
That said, you can convert "ã" back to "ã" with this code

Code: Select all

set str [encoding convertfrom identity $str]
j
jones
Voice
Posts: 33
Joined: Fri Jun 25, 2004 12:36 am

Post by jones »

Alchera wrote:jones: Could you please paste your web site so I can see for myself the problem?
Hello
The Page is:
http://users.hotlink.com.br/badjr/eggdr ... -0014.html

Language: Portuguese (Brazilian)
Português (Brasil)

Thanks
j
jones
Voice
Posts: 33
Joined: Fri Jun 25, 2004 12:36 am

Post by jones »

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
}
set str [encoding convertfrom identity $str]


This code is complete ?
how i do to active it´s in TCL?

Thanks
Locked