php-general Digest 22 Aug 2011 16:10:07 -0000 Issue 7450

Topics (messages 314580 through 314580):

Newbie question: replacing truetype fonts with UTF8 encoded Unicode characters
        314580 by: Venkatesh

Administrivia:

To subscribe to the digest, e-mail:
        php-general-digest-subscr...@lists.php.net

To unsubscribe from the digest, e-mail:
        php-general-digest-unsubscr...@lists.php.net

To post to the list, e-mail:
        php-gene...@lists.php.net


----------------------------------------------------------------------
--- Begin Message ---
Greetings

I have some HTML text using truetype fonts which i have to convert to UTF8
encoded unicode characters. I am just trying to replace the truetype font
characters.

The problem is that somehow the HTML tags also get converted to UTF8 :-(


I do a lot of str_replace such as the following:
$body = str_replace("þ", "க்ஷ", $body);
$body = str_replace("þ£", "க்ஷா", $body);
$body = str_replace("¬þ", "க்ஷை", $body);
$body = str_replace("V", "க்ஷி", $body);
$body = str_replace("r", "க்ஷீ", $body);
$body = str_replace("þ§", "க்ஷு", $body);
$body = str_replace("þ¨", "க்ஷூ", $body);

I guess i am missing something as silly as encoding the characters into
certain type of  strings, do the conversion and then convert to back to UTF8

How best to do this? Sorry if this is a very basic question. Thanks a lot in
advance


Regards


Venkatesh

--- End Message ---

Reply via email to