Re: [xml] Query about Encoding formats(Libxml doesnot recognise windows-1252 encoding scheme)



Dheeraj I wrote:
Hi,


we have a feed reader application which uses libxml. We get the rss
file which is a xml file from server & use your API xmlParseMemory to
parse the xml. In our application we give url name to subscribe to
feeds. One such url is http://www.azonano.com/rss.asp. If you see the
xml for this url, there is windows-1252 encoding specified.

Due to this, libxml does not parse the file & returns null. If I
replace this encoding with its equivalent ISO-8859-1, it works fine.

Note that those two are NOT equivalent; see
http://en.wikipedia.org/wiki/ISO_8859-1#The_ISO-8859-1.2FWindows-1252_mixup

Is there any generic solution to this problem where encoding which is
not supported by ;ibxml can be changed to its equivalent encoding
which is supported by libxml.

Appreciate your response.

I would say that it's indeed an iconv issue - iso-8859-1 is supported
natively by libxml2, with iconv used to handle everything else (unless
there's a Windows-specific build somewhere that uses the Windows
character set handling instead of iconv).




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]