Htmltext and latin-1 characters
2006-05-10
Mike OrrRe: [Cheetahtemplate-discuss] Htmltext and latin-1
characters
2006-05-10
Ian BickingRe: [Cheetahtemplate-discuss] Htmltext and
latin-1 characters
2006-05-11
David BingerRe: [Cheetahtemplate-discuss] Htmltext and latin-1
characters
2006-05-10
Mike Orr2006-05-11
David Binger2006-05-11
Mike Orr2006-05-11
David Binger2006-05-11
David Binger2006-05-11
David Binger2006-05-13
Akihiro KAYAMA2006-05-13
Mike Orr2006-05-15
Akihiro KAYAMARe: Htmltext and latin-1 characters
2006-06-04
Neil Schemenauer2006-06-04
ak (2 parts)2006-06-06
Akihiro KAYAMARe: Htmltext and latin-1 characters
2006-06-05
Neil Schemenauer2006-06-05
Akihiro KAYAMA2006-06-05
Neil Schemenauer2006-06-05
Mike Orr2006-06-06
Neil Schemenauer2006-06-05
Mike OrrHtmltext and latin-1 characters
Mike Orr
On 5/13/06, Akihiro KAYAMAwrote: > > Hi. > > In article <6e9196d20605101415v4a435a41r7a3e226a27b5314d@mail.gmail.com>, > "Mike Orr" writes: > > sluggoster> I tried sys.setdefaultencoding("latin1") but that has to be done in > sluggoster> the 'site' module; it's not available within a program. > > I'm also using Quixote-2 for my Japanese(UTF-8) application. Here is > a kludge I'm using to set default encoding without modifying global > site module: > > import sys > reload(sys) > sys.setdefaultencoding("utf-8") > > It can't be appropriate, but it works perfectly for getting rid of > annoying 'ascii' codec error. > > -- kayama You're not supposed to reload builtin modules. Still, if it's working it's an option. I decided to punt and just convert the characters to ASCII or "?" before putting them in the database. Because i thought I had the database truncation problem solved but it came back. [1] [1] MySQL is truncating values at the first non-ASCII character, even with the charset set to latin1 or utf8. -- Mike Orr