note 49562 deleted from function.htmlentities by danbrown

From: Date: Sun, 17 May 2009 17:02:48 +0000
Subject: note 49562 deleted from function.htmlentities by danbrown
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-154928@lists.php.net to get a copy of this message
Note Submitter: penfield888 at yahoo dot com ---- This is a followup to the older note by mirrorball_girl (5 Jan 2003) for those who may follow. Rather than making an exception for the en-dash (#150) and translating it to a hyphen, you could use the – unicode en-dash entity (assuming that you are serving up your pages as UTF-8 or some such encoding. Also, the whole thing can be done better with mb_detect_order, mb_detect_encoding and mb_convert_encoding if all you want to do is serve up a web page (if you need to convert to pure ASCII, that's another issue). You need to have multi-byte support enabled on your PHP server. Basically, the problem is with older MS programs that use Windows-1252 for their encoding, so all you really need to do is - detect for Win-1252 - if present, convert to UTF-8 - serve up your pages as UTF-8 See the manual on Multibyte String Functions for more information.

« previous php.notes (#154928) next »