[xmlsec] Re: non us-ascii filenames in user locale

Roumen Petrov xmlsec at roumenpetrov.info
Wed Jun 23 06:08:45 PDT 2004


Might I found a solution.

Application know user locale(charmap/charset etc.).

When application create xmldsig xml file should be in user locale.
Sample:
1.) LANG=fr_FR, charmap ISO-8859-1
<?xml version="1.0" encoding="ISO-8859-1"?>
<Signature xmlns="http://www.w3.org/2000/09/xmldsig#">
  <SignedInfo>
......

In method "xmlSecTransformCtxExecute" from "transforms.c" we know 
document encoding and url.
Before to xmlSecTransformCtxUriExecute(...) when encoding is not NULL(is 
it posible?) or UTF-8 we can convert ctx->url from UTF-8 to "document 
encoding", to replace temporary ctx->url with new string and to call 
xmlSecTransformCtxUriExecute.

2.) LANG=fr_FR, charmap UTF-8, xmldsig document is in UTF-8
I tested n this environment without any changes in xmlsec - its work as 
expected on linux (file "modèle.txt" is in UTF-8 encoding).

3.) On windows application should create xmldsig document in CPNNNN charset
This is not tested.


What about proposed solutions (described above changes in 
"xmlSecTransformCtxExecute" ) ?





More information about the xmlsec mailing list