Wednesday, 28 August 2013

Conversion of mixed ASCII string with multi-byte sequences to proper UTF-8

Conversion of mixed ASCII string with multi-byte sequences to proper UTF-8

Please consider the following ASCII string that comes in from a CSV file:
Foo\xe2\x80\x99s Bar
Using PHP, how can one reliably convert this to UTF-8 so that the value is:
Foo's Bar

No comments:

Post a Comment