Re: Converting "\u00F4" style characters
Michael Wallner <[email protected]>
| Newsgroups | gmane.comp.php.internationalization |
|---|---|
| Organization | IWORKS |
| Message-ID | <[email protected]> |
Hi Asgeir Frimannsson, you wrote: > Hi Mike, > > Don't know if this is exactly what you're after, but the following > example converts hex unicode, eg "00F4" (strip the "\u") to utf8: > > <?php [...] > $ch4 = '0034'; // digit '4' > $chA = '0041'; // char 'A' > $utf4 = unicode_to_utf8($ch4); > $utfA = unicode_to_utf8($chA); > > print $utf4 ."\n" . $utfA; > ?> Hi Asgeir, it seems that the function doesn't work with higher values like "\u20AC" which is the EUR symbol :-( Any ideas? Many thanks, -- Michael - < mike(@)php.net >
signature.asc
(application/pgp-signature, 186 B)
-----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.1 (Cygwin) iD8DBQFAqdZu2pTtEijQyW0RAq85AJ4l8U8MxsUNByrqhl2dWHDnKzNgigCeM+CC JK96i7MjsjFtcmQBV8lynyQ= =pfFT -----END PGP SIGNATURE-----