pydoc and latin-1/iso-8859-1/scandinavian letters

Jorge Godoy godoy at metalab.unc.edu
Wed May 21 09:18:48 EDT 2003


Rami Saarinen <rs55862 at NOSPAMyahoo.com> writes:

> A quick newbie question: Is there any way to get the latin-1
> characters to show up correctly on the pydoc output? Currently it
> seems that the next letter after the latin-1 character (such as ä) is
> not displayed.
> For example the text "tämä on testi" will show up as "tääon testi".

I'm having almost the same problems with wxPython and the pgdb
module. 

But here, those seem to convert my wxStaticText and output data to
UTF-8... 

Sample output from PostgreSQL using pgdb module:

----------------------------------------------------------------------
[['Jorge', 'Godoy'], ['Juliano', 'Godoy'], ['\xc9rica', 'Balaniuc']]
----------------------------------------------------------------------

The '\xc9' should be printed as 'É'. 

The output is correctly shown through psql, though.


I've already added the following statement to my code, as shown in
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue/common/src/datasources/drivers/postgresql/pygresql/Driver.py?rev=1.41&content-type=text/vnd.viewcvs-markup 

----------------------------------------------------------------------
cursor.execute("SET CLIENT_ENCODING TO 'iso-8859-1')
----------------------------------------------------------------------
(and ISO, Iso, ISO8859-1, etc. variations)

without success. My python source also contains the encoding statement
as in PEP-263.


I'd greatly appreciate some hint.


See you,
-- 
Godoy.      <godoy at metalab.unc.edu>

Give your child mental blocks for Christmas.




More information about the Python-list mailing list