[EMAIL PROTECTED] wrote:
I am wondering how encoding works in JaxME(and in general)

Say I have a header bytes.  Now, I happen to know those bytes are encoded
in utf-16 and so I can parse the header to the following.....

<?xml version="1.0" encoding="utf-16"?>

1. Isn't this a catch 22?  I can only read this into a string if I know
ahead of time that it is utf-16(in which case, specifying encoding
attribute is useless)?

If it is utf-16 indeed, then the "<" is encoded as two bytes, which can be clearly distinguished from the two bytes "<?", which you would see in UTF-8, or ASCII.


2. OR is the header always in ascii and then when I get to the encoding, I
know to read in everything else as utf-16?

No, the header is in the same encoding.


How does encoding work with JaxME?

Just in the same way than for any other XML parser/creator.


Jochen

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to