[rabbitmq-discuss] Unicode handling changed between 2.5.1 and 2.6.1?

Lionel Cons lionel.cons at cern.ch
Mon Sep 19 06:42:31 BST 2011


Toby Corkindale writes:
 > Hmm.. I am using Lionel's Net::STOMP::Client module. The version of it 
 > hasn't changed, but I wonder if it uses the STOMP header to determine 
 > how to decode the message to/from utf8 automatically?

Net::STOMP::Client fully implements the STOMP 1.1 spec and does use
the content-type header to find out if the message body needs decoding
or not. See http://search.cpan.org/dist/Net-STOMP-Client/lib/Net/STOMP/Client/Frame.pm#ENCODING

 > Lionel, hope you don't mind answering - what's the best-practice way to 
 > send UTF8 characters in the body of FRAMEs via your module - convert the 
 > unicode strings to byte streams and send it as a binary frame, or leave 
 > it as a perl unicode string, and set a content-type header to match?

Provided that you interact with a STOMP 1.1 server (RabbitMQ is one
AFAIK) and that the receiving client speaks STOMP 1.1 too, both
methods should work equally well. I would recommend to use the
content-type header because it's less work for you and the receiver
will get information about how to use the message.

Cheers,

Lionel


More information about the rabbitmq-discuss mailing list