Re: [bdbxml] default document encoding

George Feinberg <[email protected]>
Newsgroups gmane.comp.db.dbxml.general
Message-ID <[email protected]>
Hello,

If you use a wholedocument storage container, you'll get back
exactly what you put in, encoding and all.  You have
to use the XmlDocument::getContent*() methods.

Specific query results as XmlValue objects are going to be UTF-8.
Node storage containers will also return documents as UTF-8 in
all cases (they are stored as UTF-8).

If you need to get the original encoding,  the simplest thing is to
use wholedocument storage.  If this is not an option,
you'll need to transcode it.

Using the C++ interface, you can do this using
the XmlDocument::getContentAsDOM() method along
with using a Xerces DOMWriter interface to transcode.
Note that the DOMWriter can be pretty heavy-weight.

There are plans to add transcoding options to some of the
"get" interfaces in the future.   What would you like to see in this
area?

George

> Hi, I think it's probably something very basic I missed reading, but I
> have this issue. Every time I put a document with a specific  
> encoding, say
> ISO-8859-1, when I get it back I get it with UTF-8, is there a way to
> change the default behavior of the container in order to make it  
> keep the
> doc with a specific encoding?
>
> Thanks.



------------------------------------------
To remove yourself from this list, send an
email to [email protected]
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.