Opened 14 years ago

Closed 11 years ago

#6411 closed defect (wontfix)

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

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

Description (last modified by Ryan J Ollos)

[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.

Change History (1)

comment:1 Changed 11 years ago by Ryan J Ollos

Description: modified (diff)
Resolution: wontfix
Status: newclosed

This plugin is deprecated. See the TracMigratePlugin.

Note: See TracTickets for help on using tickets.