| Posted by iktorn on 07/11/07 19:56 
Markus napisał(a):> Hello
 >
 > I try to write RTF files using text in UTF-8 encoding. Converting the
 > text with utf8_decode() already fails on characters such as an
 > apostrophe or an endash.
 >
 > So these are actually my questions:
 > - Is there a good way to convert an UTF-8 string into CP1252, without
 > losing the non-CP1252 character info? (mbstring is not available on that
 > server)
 
 You will always lose some characters wile converting utf-8 to encoding
 that can handle up to 255 chars.
 
 I haven't done anything related to RTF, but to convert UTF8 to CP-1252
 you can use iconv library:
 http://pl.php.net/manual/en/ref.iconv.php
 
 with optional //IGNORE and //TRANSLIT modifiers
 
 --
 Wiktor Walc
 http://phpfreelancer.net/en
 Freelance PHP Developer
  Navigation: [Reply to this message] |