mina-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bernd Fondermann <bernd.fonderm...@gmail.com>
Subject Re: [VYSPER][nbxml] Non-ASCII chars get crippled
Date Sun, 23 Sep 2012 07:47:39 GMT
This is a first shot from me at it:
Replacing all
   buffer.put((byte) c);
by
   protected void putChar(char c) {
        if ((c & 0xff00) != 0) {
            final byte shifted = (byte)(((int)c) >> 8);
            buffer.put(shifted);
        }
        buffer.put((byte)c);
    }

which breaks unit tests and leads to exceptions later. I had no time
to investigate further.

  Bernd


On Sat, Sep 22, 2012 at 10:24 PM, Niklas Gustavsson
<niklas@protocol7.com> wrote:
> On Thu, Sep 20, 2012 at 9:16 AM, Bernd Fondermann <bf_jak@brainlounge.de> wrote:
>> when a stanza contains Characters which don't fit in a byte, these get
>> crippled by XMLTokenizer:
>>   buffer.put((byte)c);
>>
>> I'll be opening a JIRA for that.
>> Any ideas how to properly fix this the best way?
>
> I'll have a look at it tomorrow and see if I can figure something out.
>
> /niklas

Mime
View raw message