Modify

Opened 16 years ago

Closed 12 years ago

#4030 closed defect (fixed)

better solution for ensuring utf-8 consistancy with

Reported by: bodepd@… Owned by: Anton Stroganov
Priority: normal Component: MantisImportScript
Severity: normal Keywords: UTF-8 mysql unicode use_unicode
Cc: Trac Release: 0.10

Description (last modified by Ryan J Ollos)

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,
                user=_user, passwd=_password, db=_db, compress=1,
                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.

Attachments (0)

Change History (3)

comment:1 Changed 14 years ago by anonymous

Keywords: UTF-8 added; utf-8 removed

comment:2 Changed 14 years ago by Ryan J Ollos

Description: modified (diff)

comment:3 Changed 12 years ago by Anton Stroganov

Resolution: fixed
Status: newclosed

thank you.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Anton Stroganov.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment


E-mail address and name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.