Lookery Dev Blog RSS

"Stream of geeky consciousness..." @electromute


Authors
@ckelly@danmil
@dcancel@eliast

Friends


Archive

Oct
10th
Fri
permalink

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.

find_php_non_utf8

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

Comments (View)
blog comments powered by Disqus