- Use more portable version of detecting encoding errors
# Should hopefully fix PHP 5.3 build on Travis