WordPress.org

Making WordPress.org

Opened 6 years ago

Closed 3 years ago

#386 closed defect (fixed)

Trac truncates data at 4-byte UTF-8 characters

Reported by: SergeyBiryukov Owned by:
Milestone: Priority: normal
Component: Trac Keywords:
Cc:

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
5 years ago

Another instance in #wp31019.

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


5 years ago

#3 @ocean90
4 years ago

#1000 was marked as a duplicate.

#4 @nacin
4 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
4 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
4 years ago

Test: 💩

#7 @nacin
4 years ago

  • Description modified (diff)

#8 @nacin
4 years ago

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

#9 @samuelsidler
3 years ago

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

#10 @ocean90
3 years ago

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

Yes.

Note: See TracTickets for help on using tickets.