Edgewall Software
Modify

Opened 12 years ago

Closed 12 years ago

Last modified 12 years ago

#10861 closed defect (fixed)

still one unicode related unit-test error for MariaDB

Reported by: Christian Boos Owned by: Jun Omae
Priority: normal Milestone: 0.12.5
Component: database backend Version: 0.12-stable
Severity: normal Keywords: mysql unicode
Cc: Branch:
Release Notes:

Fix failure of unit-test with UCS4 characters on MariaDB

API Changes:
Internal Changes:

Description

I just ran the whole test suite on 0.12-stable for my MariaDB 5.3.3 backend, and got the following:

ERROR: test_props_format_wrap_bothsides_unicode (trac.ticket.tests.notification.NotificationTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "c:\Trac\repos\0.12-stable\trac\ticket\tests\notification.py", line 942, in test_props_format_wrap_bothsides_unicode
    ticket.insert()
  File "c:\Trac\repos\0.12-stable\trac\ticket\model.py", line 226, in insert
    @self.env.with_transaction(db)
  File "c:\Trac\repos\0.12-stable\trac\db\api.py", line 77, in transaction_wrapper
    fn(ldb)
  File "c:\Trac\repos\0.12-stable\trac\ticket\model.py", line 232, in do_insert
    [values[name] for name in std_fields])
  File "c:\Trac\repos\0.12-stable\trac\db\util.py", line 65, in execute
    return self.cursor.execute(sql_escape_percent(sql), args)
  File "c:\Dev\Python272\lib\site-packages\MySQLdb\cursors.py", line 174, in execute
    self.errorhandler(self, exc, value)
  File "c:\Dev\Python272\lib\site-packages\MySQLdb\connections.py", line 36, in defaulterrorhandler
    raise errorclass, errorvalue
OperationalError: (1366, "Incorrect string value: '\\xF0\\xA0\\x80\\x8B\\xE9\\x85...' for column 'component' at row 1")

Looks like we discussed that in #10548 already, but there was still something left to be done (cf. jomae)

\xF0\xA0\x80\x8B (U+2000B) is valid UTF-8 bytes sequence. The same bytes exist in trac.util.tests.text.WrapTestCase.test_wrap_ambiwidth_double, the test confirms working on both UCS2/UCS4 builds of Python. But mysql 5.0 and 5.1 don't support 4-byte utf-8.

I'll replace the bytes with 3-byte utf-8 (UCS2) in test_props_format_wrap_bothsides_unicode, later.

Attachments (0)

Change History (2)

comment:1 by Jun Omae, 12 years ago

Milestone: next-minor-0.12.x0.12.5
Release Notes: modified (diff)
Resolution: fixed
Status: newclosed

I'm sorry. I've forgotten….

Replaced in [11368-11370].

comment:2 by Jun Omae, 12 years ago

Owner: set to Jun Omae

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Jun Omae.
The resolution will be deleted. Next status will be 'reopened'.
to The owner will be changed from Jun Omae to the specified user.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.