That was what I thought when I first started this, that that would never work, but so many people have told me since then to try this that I figured I was wrong. Now I'm not sure what to think!

janine

On Jun 25, 2009, at 5:53 PM, Stephen Deasey wrote:

On Fri, Jun 26, 2009 at 12:04 AM, Janine Sisk<jan...@furfly.net> wrote:

set translated_page_body [encoding convertto gb2312 $page_body]


This isn't going to work. It's not the encoding of the characters you
need to change but the characters themselves.

You want to do the equivalent of this:

% string map {h H w W} "hello world"
Hello World

Where 'h' and 'H' are similar, but distinct, letters and the encoding
hasn't changed (happens to be utf8 in my terminal, could be ascii
etc.).


In fact, looking at the source code for the software at
mandarintools.com that's all they're doing. It's a poor quality
conversion, according to what I've read, but if it's sufficient well
hey!

The file hcutf8.txt in the .zip source bundle contains a mapping of
simplififed to traditional characters. The first character on each
line (that is not a comment) is the simplified character, followed by
one or more traditional candidate characters.

You could create a Tcl list in the format string-map is expecting,
with each of the traditional characters followed by the simplified
character. Without using a proxy setup, simply map the
utf8-traditional response body into utf8-simplified and send directly
to the browser.


--
AOLserver - http://www.aolserver.com/

To Remove yourself from this list, simply send an email to <lists...@listserv.aol.com > with the body of "SIGNOFF AOLSERVER" in the email message. You can leave the Subject: field of your email blank.

---
Janine Sisk
President/CEO of furfly, LLC
503-693-6407


--
AOLserver - http://www.aolserver.com/

To Remove yourself from this list, simply send an email to 
<lists...@listserv.aol.com> with the
body of "SIGNOFF AOLSERVER" in the email message. You can leave the Subject: 
field of your email blank.

Reply via email to