[wxPython-users] Re: wxPython and Unicode and widgets

Karsten Hilbert Karsten.Hilbert at gmx.net
Thu Dec 20 03:00:46 PST 2007


On Thu, Dec 20, 2007 at 01:59:11AM +0200, Donn Ingle wrote:

> I am opening font files and they can have any kind of weird family names and
> file names. I need to pass those strings into various places in the app.

For file names use sys.getfilesystemencoding().

Data *inside* the font files really *should* have an
implicit or explicit declaration of encoding somehwere.

Implicit might be

- whatever the author of the font file happened to encode
  data in his locale in
- a fixed encoding the font file specs might have put down

But the world isn't perfect so it may still be tricky. I am
at times dealing with files

a) which tell me are in encoding 1
b) actually are in encoding 2
c) all the while the specs mandate encoding 3

Hah !

Karsten
-- 
GPG key ID E4071346 @ wwwkeys.pgp.net
E167 67FD A291 2BEA 73BD  4537 78B9 A9F9 E407 1346




More information about the wxpython-users mailing list