HomePhabricator

Make libphutil compatible with utf8mb4

Description

Make libphutil compatible with utf8mb4

Summary:
Ref T1191. Two changes here:

  • Try to use the utf8mb4 character set. Fall back to utf8 if it's not available. This may be slightly worse for old MySQL, but is far, far easier than trying to keeep a cache around somewhere with availability information.
  • Prepare to transition to utf8mb4. I'm just going to switch this over in the future. I considered trying to save the migration state in the environment somewhere, but it gets really, really messy because we have to inspect the migration state in order to build a connection object. There's also no advantage in the overwhelming majority of cases. We can do something more messy here eventually if it ends up being more complicated than I think.

Test Plan: Wrote comments full of emoji locally.

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: epriestley

Maniphest Tasks: T1191

Differential Revision: https://secure.phabricator.com/D10604

Details

Provenance
epriestleyAuthored on
epriestleyPushed on Oct 1 2014, 3:47 PM
Reviewer
btrahan
Differential Revision
D10604: Make libphutil compatible with utf8mb4
Parents
rPHUb612c4802317: Update PHP compatibility information
Branches
Unknown
Tags
Unknown
Tasks
T1191: Comments are truncated at first non-base-plane character