[sqlalchemy] Re: Problem using utf-8

2008-09-18 Thread Jürgen Hauptmann

Thank you.

Switching to 1.2.2 and using connect_args = {'use_unicode': 
False,'charset': 'utf8'} works fine for me.

Jürgen
Michael Bayer schrieb:
 I believe this is the ticket:

 http://sourceforge.net/tracker/index.php?func=detailaid=1592353group_id=22307atid=374932

 its a little ambiguous as to its resolution, maybe I'll ask Shannon  
 what his most recent experiences were.


 On Sep 17, 2008, at 12:03 PM, Bo Shi wrote:

   
 While researching which version to deploy, I had run into a thread
 post _claiming_ that 1.2.2 had a critical bug which was documented in
 the fedora bugzilla.  I never managed to actually find said bug but it
 scared me off.  The reason we went with 1.2.1p2 was because it was the
 version the Django people have been using with success.

 At any rate, the workaround I posted seems to work for us thus far,
 though I don't have a good understanding of exactly why it works (I
 suspect it tiptoes around a double-encoding bug in mysqldb).


 Bo

 On Wed, Sep 17, 2008 at 11:31 AM, Michael Bayer
 [EMAIL PROTECTED] wrote:
 
 On Sep 17, 2008, at 10:50 AM, Bo Shi wrote:

   
 I ran into a similar issue using MySQL-python-1.2.1_p2-1 (mysqldb)
 with SA 0.4.2p3-1.
 
 I would advise upgrading to MySQL-python 1.2.2.  I believe some utf-8
 issues have been fixed.


   


 
   


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
sqlalchemy group.
To post to this group, send email to sqlalchemy@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/sqlalchemy?hl=en
-~--~~~~--~~--~--~---



[sqlalchemy] Re: Problem using utf-8

2008-09-18 Thread Bo Shi

 Switching to 1.2.2 and using connect_args = {'use_unicode':
 False,'charset': 'utf8'} works fine for me.

Hi Jürgen,

I'm curious; if you upgraded to 1.2.2, does the issue persist if you
stop using connect_args = {'use_unicode': False,'charset': 'utf8'}?


Bo

On Thu, Sep 18, 2008 at 3:07 AM, Jürgen Hauptmann
[EMAIL PROTECTED] wrote:

 Thank you.

 Switching to 1.2.2 and using connect_args = {'use_unicode':
 False,'charset': 'utf8'} works fine for me.

 Jürgen
 Michael Bayer schrieb:
 I believe this is the ticket:

 http://sourceforge.net/tracker/index.php?func=detailaid=1592353group_id=22307atid=374932

 its a little ambiguous as to its resolution, maybe I'll ask Shannon
 what his most recent experiences were.


 On Sep 17, 2008, at 12:03 PM, Bo Shi wrote:


 While researching which version to deploy, I had run into a thread
 post _claiming_ that 1.2.2 had a critical bug which was documented in
 the fedora bugzilla.  I never managed to actually find said bug but it
 scared me off.  The reason we went with 1.2.1p2 was because it was the
 version the Django people have been using with success.

 At any rate, the workaround I posted seems to work for us thus far,
 though I don't have a good understanding of exactly why it works (I
 suspect it tiptoes around a double-encoding bug in mysqldb).


 Bo

 On Wed, Sep 17, 2008 at 11:31 AM, Michael Bayer
 [EMAIL PROTECTED] wrote:

 On Sep 17, 2008, at 10:50 AM, Bo Shi wrote:


 I ran into a similar issue using MySQL-python-1.2.1_p2-1 (mysqldb)
 with SA 0.4.2p3-1.

 I would advise upgrading to MySQL-python 1.2.2.  I believe some utf-8
 issues have been fixed.





 



 




-- 
Bo Shi
207-469-8264

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
sqlalchemy group.
To post to this group, send email to sqlalchemy@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/sqlalchemy?hl=en
-~--~~~~--~~--~--~---



[sqlalchemy] Re: Problem using utf-8

2008-09-17 Thread Bo Shi

I ran into a similar issue using MySQL-python-1.2.1_p2-1 (mysqldb)
with SA 0.4.2p3-1.

http://www.mail-archive.com/sqlalchemy@googlegroups.com/msg00373.html
might shed some more light on this issue which might be a double
encoding problem?

Here is the subset of relevant keyword arguments we use with that
particular database driver in create_engine:

create_engine_kwargs = {
'encoding': 'utf-8',
'connect_args': {
'use_unicode': False,
'charset': 'utf8',
 },
}

On Wed, Sep 17, 2008 at 9:57 AM, Jürgen Hauptmann
[EMAIL PROTECTED] wrote:

 Hi

 Im using utf-8 in my mysql tables. If i insert a String with German
 Umlaute like Ü it is converted to Ãœ in the database, it ist returned as
 Ü. - What can i do that this will be correctly saved?

 my connection looks like this:

 engine = create_engine('mysql://xxx:[EMAIL PROTECTED]/test123', echo=False,
 pool_size=30, pool_recycle=3600)

 use_unicode, or the other Parameters doesn't work for me.

 the table definition looks like this:

 raum_table = Table('raum', metadata,
Column('id', Integer, ForeignKey('objekt.id'),primary_key=True),
Column('name', Unicode(100)),
Column('anzahl', Integer),
Column('raumbezeichnung', Integer),
Column('raumtyp', Integer),
Column('siedlungstyp', Integer),
Column('gebaeude', Unicode(200)),
Column('gebaeudeteil', Unicode(200)),
Column('fundstelle', Unicode(200)),
Column('befundgattung', Integer),
Column('befund', Unicode(200)),
Column('orttyp', Integer),
Column('ort', Integer)
 )

 the mapper looks like this:

 mapper(Raum, raum_table,
inherits=Objekt, polymorphic_identity='raum',
properties={
'personen':relation(Person, secondary = person_raum_table),
'handlungen':relation(Handlung, secondary = raum_handlung_table),
'objekte':relation(WObjekt, secondary = wobjekt_raum_table),
'eigenschaften' : relation(Eigenschaft, secondary =
 eigenschaft_raum_table)
}
 )



 


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
sqlalchemy group.
To post to this group, send email to sqlalchemy@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/sqlalchemy?hl=en
-~--~~~~--~~--~--~---



[sqlalchemy] Re: Problem using utf-8

2008-09-17 Thread Michael Bayer


On Sep 17, 2008, at 10:50 AM, Bo Shi wrote:


 I ran into a similar issue using MySQL-python-1.2.1_p2-1 (mysqldb)
 with SA 0.4.2p3-1.


I would advise upgrading to MySQL-python 1.2.2.  I believe some utf-8  
issues have been fixed.


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
sqlalchemy group.
To post to this group, send email to sqlalchemy@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/sqlalchemy?hl=en
-~--~~~~--~~--~--~---