Menu

Encoding Conversion

Help
2008-05-06
2013-04-23
  • Nick Weisser

    Nick Weisser - 2008-05-06

    Hi there,

    Very nice library! Just a little question:

    I'm having problems with character encoding, because the charset of my html document is set to iso-8859-1 and rssphp automatically converts to utf-8. I tried to disable this be setting RSS_PHP_ENCODING_CONVERSION to false to no avail.

    How can I force the returned values to be in iso-8859-1 instead of utf-8?

    Any pointers would be very much appreciated.

    Cheers, Nick

     
    • Blacknet

      Blacknet - 2008-05-13

      Hi Nick,

      The problem lies with PHP's DOM API, basically DOMDocument only uses and returns UTF-8, thus the only way to get latin1 (iso-8859-1) is to utf8_decode($the_output);

      Alternatively you could always use iconv

      Many Regards

      Nathan
      nathan@rssphp.net

       

Log in to post a comment.

MongoDB Logo MongoDB