"Martin v. Löwis" <[EMAIL PROTECTED]> wrote in message news:<[EMAIL
PROTECTED]>...
> klappnase wrote:
> > enc = locale.nl_langinfo(locale.CODESET).lower()
>
> Notice that this may fail on systems which don't provide the
> CODESET information. Recent Linux systems (glibc 6) have it,
> and so d
klappnase wrote:
enc = locale.nl_langinfo(locale.CODESET).lower()
Notice that this may fail on systems which don't provide the
CODESET information. Recent Linux systems (glibc 6) have it,
and so do recent Solaris systems, but if you happen to use
an HPUX9 or some such, you find that locale.CODE
"Martin v. Löwis" <[EMAIL PROTECTED]> wrote in message news:<[EMAIL
PROTECTED]>...
>
> In the locale API, you have to do
>
> locale.setlocale(locale.LC_ALL, "")
>
> to activate the user's preferences. Python does that on startup,
> but then restores it to the "C" locale, since that is the specif
klappnase wrote:
Oh, from the reading docs I had thought XP would use unicode:
It depends on the API that the application uses. Windows has the
"ANSI" (*) API (e.g. CreateFileExA) and the "Unicode" API
(CreateFileExW). The ANSI API uses what Python calls the "mbcs"
encoding; Windows calls it the AN
klappnase wrote:
On my box (mandrake-10.1) sys.getfilesystemencoding() returns
'ISO-8859-15',
however :
locale.nl_langinfo(locale.CODESET)
'ANSI_X3.4-1968'
In the locale API, you have to do
locale.setlocale(locale.LC_ALL, "")
to activate the user's preferences. Python does that on startup,
but then
"[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote in message news:<[EMAIL
PROTECTED]>...
> Michael:
>
> on my box, (winXP SP2), sys.getfilesystemencoding() returns 'mbcs'.
Oh, from the reading docs I had thought XP would use unicode:
* On Windows 9x, the encoding is ``mbcs''.
* On Mac OS X, the en
Michael:
on my box, (winXP SP2), sys.getfilesystemencoding() returns 'mbcs'.
If you post your revised solution to this unicode problem, I'd be
delighted to test it on Windows. I'm working on a Tkinter front-end
for Vivian deSmedt's rsync.py and would like to address the issue of
accented charact
"Martin v. Löwis" <[EMAIL PROTECTED]> wrote in message news:<[EMAIL
PROTECTED]>...
> That's apparently a bug in os.access, which doesn't support Unicode file
> names. As a work around, do
>
> def access(name, mode, orig=os.access):
> try:
> return orig(name, mode)
> except Unic
klappnase wrote:
I am using python-2.3.4 and get unicode errors:
f = os.path.join(u'/home/pingu/phonoripper', u'\xc3\u20ac')
os.path.isfile(f)
True
os.access(f, os.R_OK)
Traceback (most recent call last):
File "", line 1, in ?
UnicodeEncodeError: 'ascii' codec can't encode characters in position
"Serge Orlov" <[EMAIL PROTECTED]> wrote in message news:<[EMAIL PROTECTED]>...
> I've never used tkinter, but I heard good things about it. Are you
> sure it's not you who made it to return byte string sometimes?
Yes, I used a Tkinter.StringVar to keep track of the contents of an
Entry widget; a
klappnase wrote:
> Hello all,
>
> I am trying to internationalize my Tkinter program using gettext and
> encountered various problems, so it looks like it's not a trivial
> task.
Considered that you decided to support old python versions, it's true.
Unicode support has gradually improved. If you c
Hello all,
I am trying to internationalize my Tkinter program using gettext and
encountered various problems, so it looks like it's not a trivial
task.
After some "research" I made up a few rules for a concept that I hope
lets me avoid further encoding trouble, but I would feel more
confident if s
12 matches
Mail list logo