KBD

Keith Devens .com

Saturday, November 22, 2008 Flag waving
XML wasn't designed to be edited by humans on a regular basis. – Guido van Rossum

Archive: October 11, 2003

← October 10, 2003October 13, 2003 →

Daily link icon Saturday, October 11, 2003

Character set resources

I've started collecting some character set resources.

Please feel free to add any you know of that are helpful.

I currently have the problem of some textual data that has curly quotes (hex 91 and 92 in ISO-8859-1, 2018 and 2019 in Unicode) stored in MySQL on my web server, being retrieved with PHP, sent over an HTTP-based RPC mechanism to a Python program running on my desktop, and being displayed with wxWindows using wxPython. Somewhere in the process the characters are getting screwed up and those characters wind up being displayed as boxes in my wxPython application.

It seems to make it all the way to wxWindows without getting screwed up, but wxTextCtrl seems to have a problem getting fed Latin-1. It might expect Unicode, but I've been able to paste those same curly quotes in from another source and it worked, though maybe internally in the clipboard it's Unicode. I have to do some more digging. I tried converting it to utf8 on the PHP side, but that got even more screwed up, but I think that didn't get handled right by Python. This stuff's all a mess.

It turns out that wxTextCtrl takes Unicode just fine, but my stuff's in Latin-1. But I can't figure out how to tell Python "this string is latin-1, not ASCII, damnit" so that it'll let me convert it from that to Unicode. In the time I've taken to try to find the "correct" answer I could have written a conversion routine that took all the common latin-1 characters that sneak in places (like curly quotes) and converted them to their Unicode equivalents. Early on, I tried converting the text into UTF-8 on the server side, but that didn't work right Smiley frowning

Happy users of my XML-RPC library

Stuff like this makes me feel good.

Radio Apologia

http://radioapologia.com/

Bahnsen is one of my favorite people ever.

Thanks to the person who sent me a link!

Intense Tetris!

This guy(mpeg) is way better than my friend Mark.

← October 10, 2003October 13, 2003 →
November 2008
SunMonTueWedThuFriSat
 1
2345678
9101112131415
16171819202122
23242526272829
30 



RSS feed RSS feed for Keith's Weblog
Atom feed Atom feed for Keith's Weblog
Weblog archive
Recent comments
  on 4 posts

Recent comments XML

Calif. Supreme Court to take up gay marriage ban

I would argue the point is not​definitional.  While the word​marriage is su...

Justin: Nov 20, 4:37pm

Java join function

Meh, don't have null strings in​your string arrays imo, but you're​welcome ...

Keith: Nov 19, 7:51pm

Girls, please don't get breast implants

sorry but another thing i have to​make a comment on about you​men...the men...

happynow: Nov 17, 11:36pm

Books by Vincent Cheung

to all Cheung​fans:

read:

http://www.progin​osko.com/aquascum/cheung.h...

Zamir: Nov 16, 9:07am

Generated in about 0.048s.

(Used 7 db queries)

mobile phone