Opened 8 years ago

Closed 4 years ago

better solution for ensuring utf-8 consistancy with

Reported by: Owned by: bodepd@… codeFiend normal MantisImportScript normal UTF-8 mysql unicode use_unicode 0.10

I am no db expert, but I found that I had to change the following to get unicode characters to display and be entered correctly:

    mysql_con = MySQLdb.connect(host=_host,
cursorclass=MySQLdb.cursors.DictCursor, use_unicode=1)


use_unicode=1 is the same as set names="utf-8", this ensures that the database data is retrieved in this format. I prob had to do this as a misconfiguration on our DB where everything is set to latin, even thougn german characters are used.

comment:1 Changed 6 years ago by anonymous

• Keywords UTF-8 added; utf-8 removed

comment:2 Changed 6 years ago by rjollos

• Description modified (diff)

comment:3 Changed 4 years ago by codeFiend

• Resolution set to fixed
• Status changed from new to closed

thank you.