xml editor

Supported platforms

Compatible with Windows7 & Mac OS X Snow Leopard

Ready for data server software
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date]

Re: [xsl] Encoding base64 with XSLT


Subject: Re: [xsl] Encoding base64 with XSLT
From: "Michael Wiedmann" <michael.wiedmann@xxxxxxxxx>
Date: Thu, 19 Aug 2004 11:58:59 +0200

David Carlisle wrote:
...
having said that the example you gave was

TfxsbGVy

which is the base64 encoding of the latin-1 encoded characters, which is
rather strange. Do you really want to use latin1? How would you encode
characters above position 127 in that case?

.....

I just looked at
http://www.faqs.org/rfcs/rfc2849.html
and I think that your example is wrong, the spec uses a datatype of

BASE64-UTF8-STRING

so presumably the characters should be utf8 encoded before base 64
encoding (so u-umlaut would take two bytes in the string that is being
base64 encoded not one).

You are absolutely right.
My example was not taken from the original addressbook file (which is encoded in UTF-8), I had it just written down and did not pay enough attention.


I think I will attempt to base64 encode all text nodes using an external (Perl) script first and then convert this intermediate file using my (adapted) XSL stylesheet to LDIF. The LDIF file itself is just used to be fed into the LDAP server and does not have to be readable.

Thanks for your answers.
Michael


Current Thread
Keywords
xsl
XML Editor | XML Author | WYSIWYG Editors | Schema Editor | XSD Documentation | XSL/XSLT Editor | XQuery | XML Databases | SVN Client
© 2002-2011 SyncRO Soft Ltd. All rights reserved. | Sitemap | Privacy Policy | This website was created & generated with <oXygen/>®XML Editor