Homec4science

Implement phutil_is_utf8_with_only_bmp_characters() without segfaulting

Authored by epriestley <git@epriestley.com> on Feb 24 2014, 01:19.

Description

Implement phutil_is_utf8_with_only_bmp_characters() without segfaulting

Summary: See comments. The regexp based implementation segfaults unpreventably on small inputs. Do it nice and slow in PHP instead.

Test Plan: Ran unit tests.

Reviewers: btrahan, arice

Reviewed By: arice

CC: chad, arice, aran

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

Details

Committed
epriestley <git@epriestley.com>Feb 24 2014, 01:19
Pushed
aubortMar 17 2017, 12:03
Parents
rPHU0879582275a5: Add phutil_is_utf8_with_only_bmp_characters()
Branches
Unknown
Tags
Unknown

Event Timeline

epriestley <git@epriestley.com> committed rPHUba77b3501a15: Implement phutil_is_utf8_with_only_bmp_characters() without segfaulting (authored by epriestley <git@epriestley.com>).Feb 24 2014, 01:19