Oct
10th
Fri
10th
Find PHP code that is not UTF-8 safe
Here’s a quick shell script that searches your codebase to find functions that are not UTF-8 compliant.
Example run:
[dcancel@macbookpro:~/]$ ./find_php_non_utf8 ~/Downloads/codeigniter -------------------------------------------------------------------------------- Searching for non-UTF-8 compliant PHP code -------------------------------------------------------------------------------- ~/Downloads/codeigniter/.../users.php:71: $data['redirect_to'] = substr($this->uri->uri_string(), $buffer); ~/Downloads/codeigniter/.../users.php:137: $data['redirect_to'] = substr($this->uri->uri_string(), $buffer);
- David

