[xmlsec] non us-ascii filenames in user locale
Roumen Petrov
xmlsec at roumenpetrov.info
Mon Jun 21 05:21:09 PDT 2004
Hi Aleksey,
I have problems with reference file url, when file name contain
characters above 128.
To debug the problem i do some modifications in src/io.c and
apps/xmlsec.c - please find attached file "xmlsec1-1.2.2-locale.patch.bz2":
- in io.c filename is converted from UTF-8 to current locale
codesec(charset) in addition;
- xmlsec.c is changed to support current locale settings.
Test case goal is to sign file with name "modèle.txt" and test files are
in attachment "nonlatin_names.tar.gz".
Konsole(KDE) snapshots are in files "xmlsec-fr_FR-ISO-8859-1.png" and
"xmlsec-bg_BG-ISO-8859-5.png".
Note that this name cannot be converted from UTF-8 to ISO-8859-5 charset.
When locale is fr_FR all work as expected.
When locale is bg_BG (note codeset is ISO-8859-5) test with UTF-8 fail
as excepted. Test with ISO-8859-5 succeed but debug output
xmlSecTransformInputURIOpen show strange file name. This file name is
not in UTF-8 encoding. Might this is libxml (2.6.3) bug ?
I don't think that xmlsec should depend and use directly iconv. I think
than xmlsec should ensure reference url in UTF-8 and escaped only. Rest
of this migth should do libxml.
What is your opinion ?
Problem is how to get CPnnnn (for MS-Win) encodings to work in libxml
without to write extra code. We can build it with iconv, but libxml
limit encodings(charset).
Should we call iconv methods in xmlsec or to register more encoding
handlers in libxml or to wait libxml to extend supported encodings to
match available in iconv ?
Regarts,
Roumen Petrov
P.S.:
Note file io.c is same in xmlsec 1.2.5.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: nonlatin_names.tar.gz
Type: application/x-gunzip
Size: 1014 bytes
Desc: not available
Url : http://www.aleksey.com/pipermail/xmlsec/attachments/20040621/0b18cf6e/nonlatin_names.tar-0002.bin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: xmlsec-fr_FR.ISO-8859-1.png
Type: image/png
Size: 36958 bytes
Desc: not available
Url : http://www.aleksey.com/pipermail/xmlsec/attachments/20040621/0b18cf6e/xmlsec-fr_FR.ISO-8859-1-0002.png
-------------- next part --------------
A non-text attachment was scrubbed...
Name: xmlsec-bg_BG.ISO-8859-5.png
Type: image/png
Size: 44585 bytes
Desc: not available
Url : http://www.aleksey.com/pipermail/xmlsec/attachments/20040621/0b18cf6e/xmlsec-bg_BG.ISO-8859-5-0002.png
-------------- next part --------------
A non-text attachment was scrubbed...
Name: xmlsec1-1.2.2-locale.patch.bz2
Type: application/x-bzip2
Size: 1881 bytes
Desc: not available
Url : http://www.aleksey.com/pipermail/xmlsec/attachments/20040621/0b18cf6e/xmlsec1-1.2.2-locale.patch-0002.bin
More information about the xmlsec
mailing list