#1185: Encoding problem with path of connection file
---------------------+------------------------------------------------------
Reporter: cito | Owner: ed
Type: defect | Status: assigned
Priority: major | Milestone: 0.9
Component: app | Version:
Resolution: | Keywords:
---------------------+------------------------------------------------------
Comment (by cito):
The filenames are actually byte strings which could be anything, but
you're right, it is reasonable to assume they are using the user's default
encoding, otherwise they would not be able to decipher them. And it even
seems I erred in my statement above that they are utf-8 under Windows,
they are not, they are cp1252 (the Windows variant of latin-1).
So using dApp.Encoding is probably the right thing, which however leads to
another problem, namely that it returns utf-8 while Windows actually uses
cp1252.
This is because dabo uses `getlocale()` to determine the default encoding
(in several places), but this usually returns None and so the hardcoded
'utf-8' is used anyway.
Instead (or in addition, if `getlocale()` returns None, it may be better
to use `getdefaultlocale()`or `getpreferredencoding()` which correctly
returns 'cp1252' on Win.
--
Ticket URL: <http://trac.dabodev.com/ticket/1185#comment:5>
Dabo Trac <http://trac.dabodev.com>
Trac Page for Dabo
_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-dev
Searchable Archives: http://leafe.com/archives/search/dabo-dev
This message:
http://leafe.com/archives/byMID/[email protected]