Opened 10 years ago

Closed 8 years ago

#386 closed defect (bug) (fixed)

Trac truncates data at 4-byte UTF-8 characters

Reported by: sergeybiryukov's profile SergeyBiryukov Owned by:
Milestone: Priority: normal
Component: Trac Keywords:

Description (last modified by nacin)

See #wp18189.

I've noticed that ticket description was truncated. I have the full description in my email notification from 2011, so I've tried to restore it, but it got truncated again.

I guess it's a result of moving to MySQL in #253. According to #wp13590, MySQL supports 4-byte UTF-8 characters since version 5.5.

Test: 💩

Change History (10)

#1 @SergeyBiryukov
10 years ago

Another instance in #wp31019.

This ticket was mentioned in Slack in #core by sergeybiryukov. View the logs.

9 years ago

#3 @ocean90
9 years ago

#1000 was marked as a duplicate.

#4 @nacin
9 years ago

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

I've fixed this for core.trac by converting most utf8 columns to utf8mb4. Other Tracs including meta.trac, which all still use SQLite, were unaffected.

I say most because primary key index lengths (innodb_large_prefix is not on) blocked it on the attachment, component, milestone, node_change, ticket_custom, and wiki tables. None of these fields have a pressing (or any) need for four-byte characters in them.

#5 @SergeyBiryukov
9 years ago

  • Resolution fixed deleted
  • Status changed from closed to reopened

I've tried to restore the description of #wp18189 again, and the U+1F4A9 character was replaced with ????.

#6 @nacin
9 years ago

Test: 💩

#7 @nacin
9 years ago

  • Description modified (diff)

#8 @nacin
9 years ago

Fail, meta.trac is SQLite. I'll do some local testing

#9 @samuelsidler
8 years ago

Since we switched core trac back to SQLite, is this fixed?

#10 @ocean90
8 years ago

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


Note: See TracTickets for help on using tickets.