activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Pascual <dpascua...@gmail.com>
Subject Re: Apache.NMS.Stomp error receiving special characters
Date Tue, 01 Feb 2011 09:54:47 GMT
I think text body is encoded  as UTF-8, I have modified the test
"TestQueueRollbackConsumerListener" to send the text "Tést Message" and when
the listener receive the message, the character "é" is illegible. The
message is send and recived by Stomp client so the message is processing as
UTF-8.

I have repeated the test reading the message with java client and the
special characters are processed without problem, so I think the problem is
for incoming messages.

When a text message is created the only parameter needed is a string and in
.NET, I think it is encoded as UTF-16. I don't know if this is a problem.

Do we have to do something when receive a text message with special
characters?

2011/1/31 Timothy Bish <tabish121@gmail.com>

> On Mon, 2011-01-31 at 22:20 +0100, David Pascual wrote:
> > Hi,
> >
> > We are using NMS STOMP client for CF 2.0, and we have a error when the
> > client recives text messages with special characters like "é", that are
> > transformed in illegible characters.
> >
> > I have modified the BinaryReader constructor from "TcpTransport" class in
> > NMS Stomp client, just to add Encoding.Default (instead of to use UTF-8,
> > that is use for default constructor)
> >
> > socketReader = new BinaryReader(CreateSocketStream(), Encoding.Default);
> >
> > Wiht this modification, text messages with special characters are
> received
> > without errors.
> >
> > Do we have to do something to send special chareacters in a text message
> > with Stom? Do you know if we can configure Stomp client to use
> > Encodig.Default?
> >
> > Thanks in advance
> > David
>
> The Stomp .NET client is expecting that the text in the body of the
> message is encoded as UTF-8.  Is you text being encoded as UTF-8?
>
> Regards
>
> --
> Tim Bish
> ------------
> FuseSource
> Email: tim.bish@fusesource.com
> Web: http://fusesource.com
> Twitter: tabish121
> Blog: http://timbish.blogspot.com/
>
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message