I don't fully understand your question but I hope this helps.
If I remember correctly I once did this ( at the time I made a fool of myself over endians).

The Endian is set in the stream. I assume you know which one it is:
bs.littleEndian = true or false // depends on what you have.

To read one character:
         oneChar = bs.read(1, encodings.UTF16)

I hope someone corrects me if my memoryblock is corrupted.

Boris



On 12 feb 2006, at 11:25, Matthias Buercher wrote:

two utf16 questions:

(1) with

        defineencoding(encodings.utf16)

i can define the string as utf16.
but how can i define it as bigendian or littleendian?

(2) given a binarystream and i know that i have to read a utf16 string with a given character length, what would be the proper method to read this string? the bytelength can be bigger then 2*characterlength. i thought to read first 2*characterlength and then test if the character length is achieved, else read chunks as long until the string has its length.

matthias


_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>


_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>

Reply via email to