divisive_cotton — 2012-02-18T04:54:36-05:00 — #1
All pages I create now are HTML5 and I declare UTF-8 in the header:
<meta charset="utf-8" />
Is it considered good practice to use the PHP multibyte string functions (http://php.net/manual/en/ref.mbstring.php)? Or if you are not writing code for a multi-lingual user base does it really matter?
thereddevil — 2012-02-18T06:57:04-05:00 — #2
Please keep in mind that the meta charset is overwritten by a header stating the content type and the charset. So you should use this in addition: header('Content-Type: text/html; charset=utf-8');
In the event that your website will only use latin based character there is no need to use multibyte functions, it is first when you either use a multibyte language on the website you need to worry about it. (or if you believe you might use one in the future).
lemon_juice — 2012-02-18T08:34:50-05:00 — #3
I don't see anything wrong with using multi-byte string functions. If you need them use them, they are enabled on almost every host nowadays.
system — 2014-10-07T21:57:58-04:00 — #4
This topic is now closed. New replies are no longer allowed.