Re: Htmltext and latin-1 characters

Akihiro KAYAMA <[email protected]>
Newsgroups gmane.comp.web.quixote.user
Message-ID <[email protected]>
In article <[email protected]>,
Akihiro KAYAMA <[email protected]> writes:

kayama> I'm also using Quixote-2 for my Japanese(UTF-8) application.  Here is
kayama> a kludge I'm using to set default encoding without modifying global
kayama> site module:
kayama> 
kayama>    import sys
kayama>    reload(sys)
kayama>    sys.setdefaultencoding("utf-8")
kayama> 
kayama> It can't be appropriate, but it works perfectly for getting rid of
kayama> annoying 'ascii' codec error.

In addition, today I tested the application on Python-2.4.2 + Quixote-2.4
and found that I could get rid of sys.setdefaultencoding().

When I wrote it last year, both Python-2.3 and Quixote-2.0 had
mysterious Unicode related problems such as using % operator so I gave
up and decided to change default encoding simply. Improvement in
Unicode support of current version of both softwares seems to resolve
such problems. (CHANGES told me it was done at Quixote-2.2)

Perhaps, implicit conversion between unicode and str is evil, or default
encoding should not be site global.

In article <[email protected]>,
"Mike Orr" <[email protected]> writes:

sluggoster> You're not supposed to reload builtin modules. 

Exactly. I'm happy I can do what I am supposed to at last. Thanks for
everyone who contribute these excelent products.

-- kayama
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.