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.

Having trouble with accentuated letters

Old posts that have not been replied to for several years.
Locked
z
zedologic

Having trouble with accentuated letters

Post by zedologic »

Hi!

I have a proc that is supposed to get the accents off its input strings, like this example proc : proc unacc {str} {return [string map {á a} $str]}

Now let's say I put an 'á' into a file, and then use unacc [gets ...] the proc will convert it to 'a' correctly. But if I try to use it with binds, or through DCC (using .tcl ...) it just returns an 'á' like the 'á' in the string map function didn't the 'á' I just typed in.

Does anybody have an idea how I could solve this problem ? (right now I'm writing everything into temporary files before processing, but this just does not seem to be the right solution :-)

Thanks,
Zed.
User avatar
strikelight
Owner
Posts: 708
Joined: Mon Oct 07, 2002 10:39 am
Contact:

Post by strikelight »

Try looking at the tcl manpage entry for "encoding".
z
zedologic

Post by zedologic »

Thanks strikelight!

[string map {á a} [encoding convertto iso8859-1 $str]] works fine.

Zed.
Locked