Re: tcl 8.0.5 encoding
Available news archives: comp.lang.tcl - comp.lang.python - comp.security.firewalls - sci.crypt - comp.lang.php - comp.lang.javascript
Google
 
Web news.hping.org


comp.lang.tcl archive

Re: tcl 8.0.5 encoding

From: David Gravereaux <davygrvy@pobox.com>
Date: Wed Mar 01 2006 - 22:56:30 CET

Farty wrote:
> Donal,
>
> Sorry I am new to this tcl/tk thing. I might confuse you.
>
> What I am trying to do is to flag latin1 char range of 128-159 when
> they are being used. The application we are using does not support
> these chars somehow especially when imported from ms excel.
>
> But I need to first build a case to show this range of chars is
> not been display properly in our application. Even though tcl8.0.5
> does support 0-255 latin1 chars.
>
> Thank you,
>
> Farty
>

Try this:

regsub -all -- {[\x82-\x9f]+} $str {[\0]}

Where $str is the string you want flagged between brackets for that "not
good" range.

Donal makes a good point about encodings. 8.0.5 doesn't know anything
about the understanding of the glyphs mappings the data is to be
displayed as. Call it Latin1 if you want, but 8.0.5 just sees data.

If on the other hand, you upgrade your app from 8.0.5 to the current and
supported 8.4, you can input text under specific encodings and probably
not have the Latin1 vs. cp1252 problem you are apparently having now.

http://www.cs.tut.fi/~jkorpela/www/windows-chars.html#list
Received on Sun Apr 30 02:19:35 2006