You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by Suneel Papineni <Su...@mettoni.com> on 2011/05/04 19:14:21 UTC
Unicode support in C++ clients
Hi,
I am getting problems in sending or receiving Unicode messages. Could
someone please tell me how can I implement this correctly.
Message contains some Greek characters. I am using wide string or wide
character array to represent this message in my C++ application. I am
using "TextMessage" for normal strings. setText() method takes only
std::string or char*, so I can't add wstring or wchar_t*.
In order to accommodate these Unicode characters in the message do I
need to use any other type of messages (like ByteMessage or MapMessage).
If so could someone help me with some sample code snippet.
Note: I am using ActiveMQ-CPP 3.4.0
Thanks & Regards
Suneel
Re: Unicode support in C++ clients
Posted by Ivan Pechorin <iv...@gmail.com>.
2011/5/4 Suneel Papineni <Su...@mettoni.com>:
>
> I am getting problems in sending or receiving Unicode messages. Could
> someone please tell me how can I implement this correctly.
We use UTF-8 successfully in ActiveMQ's TextMessage since activemq-cpp-3.0.x.
In particular, we UTF-8 between C++ and Java clients.
Re: Unicode support in C++ clients
Posted by Timothy Bish <ta...@gmail.com>.
On Wed, 2011-05-04 at 18:14 +0100, Suneel Papineni wrote:
> Hi,
>
>
>
> I am getting problems in sending or receiving Unicode messages. Could
> someone please tell me how can I implement this correctly.
>
>
>
> Message contains some Greek characters. I am using wide string or wide
> character array to represent this message in my C++ application. I am
> using "TextMessage" for normal strings. setText() method takes only
> std::string or char*, so I can't add wstring or wchar_t*.
>
>
>
> In order to accommodate these Unicode characters in the message do I
> need to use any other type of messages (like ByteMessage or MapMessage).
> If so could someone help me with some sample code snippet.
>
>
You need to encode your text as UTF-8 before placing it into the
TextMessage, then it should be received correctly by other clients.
Regards
--
Tim Bish
------------
FuseSource
Email: tim.bish@fusesource.com
Web: http://fusesource.com
Twitter: tabish121
Blog: http://timbish.blogspot.com/
Connect at CamelOne May 24-26
The Open Source Integration Conference