Re: [xml] Korean Encoding
- From: Daniel Veillard <veillard redhat com>
- To: Manish Padmajan <manish padmajan celstream com>
- Cc: "'xml gnome org'" <xml gnome org>
- Subject: Re: [xml] Korean Encoding
- Date: Mon, 18 Oct 2004 06:26:41 -0400
On Mon, Oct 18, 2004 at 09:22:46AM +0530, Manish Padmajan wrote:
Hi All,
I have a xml file with Korean encoding = "ks_c_5601-1987"
iconv doesn't seems to know about that encoding or at least not under
that name:
paphio:~ -> iconv -l | grep 5601
paphio:~ -> iconv -l | grep 1987
ISO_8859-1:1987//
ISO_8859-2:1987//
ISO_8859-6:1987//
ISO_8859-7:1987//
paphio:~ ->
I am using libxml functions xmlParseFile() & xmlReadFile() in my code.
Whenever I pass the xml file having Korean encoding to these functions, both
these functions fail.
What is the correct encoding that I should use for Korean language?
I don't know, the right approach depends on a number of things. Possibly it
the encoding string which is not the canonical one, in that case you can
register an alias to the name known by iconv:
http://xmlsoft.org/html/libxml-encoding.html#xmlAddEncodingAlias
If this is really an encoding not supported by iconv you can add your
own support for it:
http://xmlsoft.org/html/libxml-encoding.html#xmlRegisterCharEncodingHandler
the structure includes the name and conversion functions to/from UTF-8
that you must provide.
Last case, if you are generating those documents, there is a number of
different potential encoding available. I'm not a specialist at all, you
should check with whoever will need to parse the data:
paphio:~ -> iconv -l | grep -i ks
BIG5-HKSCS//
BIG5HKSCS//
CSKSC5636//
KSC5636//
paphio:~ -> iconv -l | grep -i kr
CSEUCKR//
CSISO2022KR//
EUC-KR//
EUCKR//
ISO-2022-KR//
ISO646-KR//
ISO2022KR//
MACUKRAINIAN//
paphio:~ ->
Daniel
--
Daniel Veillard | Red Hat Desktop team http://redhat.com/
veillard redhat com | libxml GNOME XML XSLT toolkit http://xmlsoft.org/
http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]