Modify

Opened 5 years ago

Closed 21 months ago

#6411 closed defect (wontfix)

UnicodeEncodeError: 'latin-1' codec can't encode character u'\u2019' in position 475: ordinal not in range(256)

Reported by: anonymous Owned by: takayama
Priority: normal Component: SqliteToMySqlScript
Severity: normal Keywords:
Cc: Trac Release: 0.10

Description (last modified by rjollos)

[root@ptmon 0.11]# python sqlite2mysql -e /my/path/to/trac -p 'mysql://user:password@localhost/trac'
Traceback (most recent call last):
  File "sqlite2mysql", line 289, in ?
    main(getArgs())
  File "sqlite2mysql", line 218, in main
    rc = tmigration.migrateTable(tname) or rc
  File "sqlite2mysql", line 74, in migrateTable
    rc = self.default_copy(table)
  File "sqlite2mysql", line 95, in default_copy
    mycur.execute(insert_into, row)
  File "/usr/lib/python2.4/site-packages/trac/db/util.py", line 50, in execute
    return self.cursor.execute(sql_escape_percent(sql), args)
  File "/usr/lib/python2.4/site-packages/trac/db/util.py", line 50, in execute
    return self.cursor.execute(sql_escape_percent(sql), args)
  File "build/bdist.linux-i686/egg/MySQLdb/cursors.py", line 158, in execute
  File "build/bdist.linux-i686/egg/MySQLdb/connections.py", line 265, in literal
  File "build/bdist.linux-i686/egg/MySQLdb/connections.py", line 203, in unicode_literal
UnicodeEncodeError: 'latin-1' codec can't encode character u'\u2019' in position 475: ordinal not in range(256)

Using innodb, and I've done:

ALTER DATABASE DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci;

Running show create table <table>; on all the tables shows the DEFAULT CHARSET=utf8 and COLLATE=utf8_bin on everything.

Not exactly sure what I'm doing wrong here.

Attachments (0)

Change History (1)

comment:1 Changed 21 months ago by rjollos

  • Description modified (diff)
  • Resolution set to wontfix
  • Status changed from new to closed

This plugin is deprecated. See the TracMigratePlugin.

Add Comment

Modify Ticket

Action
as closed The owner will remain takayama.
The resolution will be deleted. Next status will be 'reopened'.
Author


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

 
Note: See TracTickets for help on using tickets.