|
Posted by Timothy Madden on 04/27/07 13:36
shimmyshack wrote:
> On Apr 26, 1:23 pm, Timothy Madden <terminato...@gmail.com> wrote:
>> Hello
>>
>> Is there a function that will allow me to
>> output text written in utf-8 (from db for example)
>> if my document has
>>
>> Content-Type: text/html; charset=ISO-8859-1
>>
>> I mean htmlspecialchars() and htmlentities() will only convert
>> characters that have an associated entity defined in HTML.
>> I would also like to translate all non-latin1 characters using
>> numeric references.
>>
[...]
>> Thank you,
>> Timothy Madden
>
> also mb_convert_encoding()
>
Actually I think mb_encode_numericentity() is the function I need.
mb_convert_encoding() will just re-encode a string from one encoding
to another, but a Latin-1 source simply can not include Latin-2
characters no matter what encoding I chose. I need numeric character
references defined by HTML for that.
Anyway I think mb_encode_numericentitiy() will work, I just need to know
how to create a map of code-point areas for it to work, and I don't
quite understand how such an area is defined.
Thank you,
Timothy Madden,
Romania
Navigation:
[Reply to this message]
|