Open glassfishrobot opened 15 years ago
@glassfishrobot Commented Reported by kristsone@java.net
@glassfishrobot Commented amyk@java.net said: In C-API Developer Guide, the key/value arguments of MQSetStringProperty function are specified as ConstMQString type which is defined as a constant MQString - a null terminated UTF-8 encoded character string. The function itself does not detect if the string passed in is UTF-8 encoded
@glassfishrobot Commented amyk@java.net said: add keyword 4.5-exclude
@glassfishrobot Commented This issue was imported from java.net JIRA MQ-20
Using the C-API and the MQSetStringProperty-function to set a non (valid) UTF-8- encoded value (or key) and then send (produce) the message works fine as well as read (consume) the message and then use the MQGetStringProperty-function. When a Java-client tries to consume the message, it gets a sun.messaging.jms.JMSException (from java.io.UTFDataFormatException)
... MQMessageHandle handle; ... const char const key = "key"; const char const value = "Ã...ÄÃ-"; // a non valid UTF-8-encoded byte-array const MQStatus status = MQSetStringProperty( handle, key, value );
Environment
Operating System: Solaris Platform: Sun
Affected Versions
[current]