activemq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bhavani Iyer <bhavan...@gmail.com>
Subject Re: [jira] Created: (AMQCPP-261) Handle Multibyte Strings or Strings encoded in Charsets other than US-ASCII
Date Wed, 20 Jan 2010 17:12:48 GMT

I recently migrated from 2.1.3 to 3.1.0 and found that I can no longer send
UTF 8 multibyte characters in the payload of a TextMessage. As a workaround
until this issue is resolved, I modified ActiveMQTextMessage::getText()
method to return the raw bytes from getContents() and bypassing the call to
OpenWireConnector::readString().

Here is the modified ActiveMQTextMessage::getText()

if( this->text.get() != NULL ) { return *( this->text.get() ); } else {

if( this->getContent().size() <= 4 ) { return ""; }
//// to get around ASCII text restriction
return std::string( (const char*)&getContent()[4], getContent().size()-4 );
}

Please let me know if this has any unintended consequence.
Thanks
-- 
View this message in context: http://old.nabble.com/-jira--Created%3A-%28AMQCPP-261%29-Handle-Multibyte-Strings-or-Strings-encoded-in-Charsets-other-than-US-ASCII-tp25265866p27245262.html
Sent from the ActiveMQ - Dev mailing list archive at Nabble.com.


Mime
View raw message