Erlang Mailing Lists

Author Message

<  RabbitMQ mailing list  ~  Ascii text for strings

Guest
Posted: Fri Jan 11, 2008 2:24 am Reply with quote
Guest
According to the amqp protocol, are ascii strings supported or for
most operations:

For example, in the Connection.start_ok AMQP operation:

You have to send the locale and the login properties (shortstr):

Must that data be sent as UTF-8 string? The protocol spec seems to be
light detailing unicode support. Or does it matter, can the server
detect the unicode type?

--
Berlin Brown
http://botspiritcompany.com/botlist/spring/help/about.html

_______________________________________________
rabbitmq-discuss mailing list
rabbitmq-discuss@lists.rabbitmq.com
http://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss
Post recived from mailinglist
tonyg
Posted: Fri Jan 11, 2008 9:56 am Reply with quote
User Joined: 07 Nov 2006 Posts: 199
Hi,

Berlin Brown wrote:
> According to the amqp protocol, are ascii strings supported or for
> most operations:

If your string contains only 7-bit ASCII characters, i.e. codepoints
less than 128, then a UTF-8 encoding of that string is the same byte
sequence as the raw ASCII encoding.

> For example, in the Connection.start_ok AMQP operation:
> You have to send the locale and the login properties (shortstr):

You can pretty much choose to send ASCII anytime UTF-8 is expected.

You will of course have to deal with potentially *receiving* byte
sequences encoding characters with codepoints greater than or equal to
128... but, depending on your application, this could be as simple as a
gentleman's agreement between all participants to avoid non-ASCII
codepoints...

> Must that data be sent as UTF-8 string?

It must.
View user's profile Send private message MSN Messenger

Display posts from previous:  

All times are GMT
Page 1 of 1
This forum is locked: you cannot post, reply to, or edit topics.

Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum