eclipse-ee4j / openmq

OpenMQ
https://projects.eclipse.org/projects/ee4j.openmq/
Other
50 stars 33 forks source link

Non UTF-8-encoded properties and C-API #20

Open glassfishrobot opened 15 years ago

glassfishrobot commented 15 years ago

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]

glassfishrobot commented 6 years ago
glassfishrobot commented 15 years ago

@glassfishrobot Commented Reported by kristsone@java.net

glassfishrobot commented 13 years ago

@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 13 years ago

@glassfishrobot Commented amyk@java.net said: add keyword 4.5-exclude

glassfishrobot commented 7 years ago

@glassfishrobot Commented This issue was imported from java.net JIRA MQ-20