Detect and convert utf-8 on string

/ Published in: PHP
Save to your folder(s)

I can't say I can rely on mb_detect_encoding(). Had some freaky false positives a while back. The following code will detect when you need to enconde or decode it.

Report this snippet


RSS Icon Subscribe to comments

You need to login to post a comment.