qpid-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jiri Krutil <j...@krutil.com>
Subject Re: JMS client skips string message properties
Date Fri, 30 Sep 2011 06:02:11 GMT
Gordon,

The most portable way of representing an UTF-16-encoded string I can think
of is using std::basic_string<uint16_t>. This would be in line with
std::string already being used for UTF-8.

What do you think?
Jiri
On Sep 26, 2011 7:33 PM, "Gordon Sim" <gsim@redhat.com> wrote:
> On 09/26/2011 12:07 PM, Jiri Krutil wrote:
>> Hi Gordon,
>>
>> that sounds pretty good.
>>
>> One more thing I realized:
>>
>> Maybe using wstring for UTF-16 strings is not such a good idea due
possible
>> portability issues. Unfortunatelly the C++ standard does not guarantee
the
>> size of wchar_t -- it could be 16 bits, 32 bits, or even 8 bits. Using
other
>> custom string types, such as basic_string<uint16_t>, is also problematic,
>> because that probably wouldn't work with iostreams.
>>
>> Or do you think it safe to assume that wchar_t is always at least 2
bytes?
>
> I think you are right and the whole wstring support needs a bit more
> thought.
>
> ---------------------------------------------------------------------
> Apache Qpid - AMQP Messaging Implementation
> Project: http://qpid.apache.org
> Use/Interact: mailto:users-subscribe@qpid.apache.org
>

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