Topic
No replies
KlingerChristian
KlingerChristian
2 Posts
ACCEPTED ANSWER

Pinned topic iSeriesAccess-6.1.0-1.0.i386.rpm and locales

‏2009-11-25T10:18:00Z |
Hi,

i have this little python script:



def insert(v):
sql = """update EXTPDAT.EXTUSER
set EXTNAME='%s'
where EXTUSR = '10024877' and EXTLFD = '0000'""" %v
#locale.setlocale(locale.LC_ALL,'de_DE')
print sql
curs.execute(sql)
conn.commit()

insert(v=u"Hansuü")


This script works fine as long as i don't use german umlauts. (üäö)

Yes, i found a lot of information on the internet about this porblem but i don't find a
good solution to this.

So this is what i tried without success...

export LANG=de_DE

/opt/ibm/iSeriesAccess/bin/cwbnltbl

cwbnltbl - Download conversion table utility
Usage: cwbnltbl source-code-page target-code-page host uid pwd
Linux locale codeset=ISO-8859-1 ccsid=819

The only thing that work is this line in my python script:

#locale.setlocale(locale.LC_ALL,'de_DE')

But this is very ugly in the sense of python.

So any idea how can i insert my german umlauts into the database?

Thanks for your help
Christian