Re: [PyWrapper-devel] Unicode
Status: Alpha
Brought to you by:
jatorre
From: <m.d...@BG...> - 2007-06-15 09:21:00
|
well, im not sure about the very latest mysql version, but mysql is very lazy = when it comes to character encodings and to my knowledge it *doesnt* = support unicode at all. What most people do is encode their data as utf8 = and dump it in mysql as latin1. that causes some confusion sometimes. = for pywrapper I think the utf8 setting would be correct in this case. = have you tried different settings? what happens? and are you sure the = =C3 is not inside your db? pywrapper has only one setting for character encodings, yes, the one you = pointed to. for serious debugging you could try to connect to the db via the = terminal using python interactively. take a look at the dbmod = dmod_mysql.py inside lib/biocase/pywrapper/dbmod (or sth like this) how = to do a connection. just retype the commands in the python shell and see = what you get. markus -----Original Message----- From: pyw...@li... on behalf of Shunde = Zhang Sent: Thu 6/14/2007 2:42 AM To: PyWrapper Developers mailing list Cc:=09 Subject: Re: [PyWrapper-devel] Unicode Hi Markus, The raw XML from your server has the correct value, eg. Punb=E4cken. = However, in my raw XML, this character is shown as "=C3=A4", which is not correct. Could you tell me how you configured it in detail? Did you just set it = in: Home =BB Configtool =BB <datasource> =BB Connection >> Encoding Is there any other place I need to look at? I am using mysql and when I created the database, I didn't set any = character set. so it is using the default one, utf-8. since if I dump the = database, I can see: /*!40101 SET NAMES utf8 */; I think this means my database is using utf8. also I set utf8 in = pywrapper. but it doesn't work. is it possible to debug it? thanks a lot. Cheers, Shunde. Quoting Markus D=F6ring <m.d...@bg...>: > shunde, > pywrapper definitely supports unicode. > you can configure the character encoding for each datasource (the > character encoding used in the database, output should always be > utf8) and it works fine for the training dataset where there are at > least latin1 characters. see here: > > = http://search.biocase.org/tapir/pywrapper?dsa=3Dtraining&op=3Di&c=3Dhttp:= // > rs.tdwg.org/dwc/dwcore/Locality&limit=3D100 > > -- > Markus > > > > On 13.06.2007, at 07:08, Shunde Zhang wrote: > > > Hi all, > > > > Does pywrapper support unicode? I've done a test. In database, my > > value is > > "Universit=E4t". and in the XML returned from pywrapper it becomes > > "Universit=C3=A4t". It seems not correct. Could anybody tell > > me how to > > configure pywrapper to support Unicode? thanks in advance. > > > > Cheers, > > Shunde. > > > > > > > > = ---------------------------------------------------------------------- > > --- > > This SF.net email is sponsored by DB2 Express > > Download DB2 Express C - the FREE version of DB2 express and take > > control of your XML. No limits. Just data. Click to get it now. > > http://sourceforge.net/powerbar/db2/ > > _______________________________________________ > > PyWrapper-devel mailing list > > PyW...@li... > > https://lists.sourceforge.net/lists/listinfo/pywrapper-devel > > > = -------------------------------------------------------------------------= > This SF.net email is sponsored by DB2 Express > Download DB2 Express C - the FREE version of DB2 express and take > control of your XML. No limits. Just data. Click to get it now. > http://sourceforge.net/powerbar/db2/ > _______________________________________________ > PyWrapper-devel mailing list > PyW...@li... > https://lists.sourceforge.net/lists/listinfo/pywrapper-devel > -------------------------------------------------------------------------= This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ _______________________________________________ PyWrapper-devel mailing list PyW...@li... https://lists.sourceforge.net/lists/listinfo/pywrapper-devel |