[ 
https://issues.apache.org/jira/browse/ARTEMIS-3598?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17456267#comment-17456267
 ] 

Gary Tully commented on ARTEMIS-3598:
-------------------------------------

There are a few differences, I am using trunk/main activemq-artemis and 
trunk/main activemq-cpp with the main.cpp modified to include your changes from 
main.c

Could this be a c vs cpp compiler thing? Or are you using a different client 
altogether?

{code}
diff --git a/activemq-cpp/src/examples/main.cpp 
b/activemq-cpp/src/examples/main.cpp
index 9cc513a8..1c2c71ea 100644
--- a/activemq-cpp/src/examples/main.cpp
+++ b/activemq-cpp/src/examples/main.cpp
@@ -117,9 +117,16 @@ public:
             string threadIdStr = 
Long::toString(Thread::currentThread()->getId());
 
             // Create a messages
-            string text = (string) "Hello world! from thread " + threadIdStr;
+            //string text = (string) "Hello world! from thread " + threadIdStr;
 
             for (int ix = 0; ix < numMessages; ++ix) {
+
+            string text = (string) "Hello world! from thread " + threadIdStr;
+if (ix == 4) {
+           text = (string) "Test Message  \u00DF";
+        } else if (ix == 5) {
+           text = (string) "Test Message  �DF";
+        }
                 std::auto_ptr<TextMessage> 
message(session->createTextMessage(text));
                 message->setIntProperty("Integer", ix);
                 printf("Sent message #%d from thread %s\n", ix + 1, 
threadIdStr.c_str());
@@ -381,7 +388,7 @@ int main(int argc AMQCPP_UNUSED, char* argv[] 
AMQCPP_UNUSED) {
     //============================================================
     bool useTopics = true;
     bool sessionTransacted = false;
-    int numMessages = 2000;
+    int numMessages = 10;
 
     long long startTime = System::currentTimeMillis();
 
gtullys-MBP:activemq-cpp gtully$ git remote -v
origin  https://gitbox.apache.org/repos/asf/activemq-cpp.git (fetch)
origin  https://gitbox.apache.org/repos/asf/activemq-cpp.git (push)
{code}

> Sending text message non-UTF-8 containing special characters from OpenWire 
> ---------------------------------------------------------------------------
>
>                 Key: ARTEMIS-3598
>                 URL: https://issues.apache.org/jira/browse/ARTEMIS-3598
>             Project: ActiveMQ Artemis
>          Issue Type: Bug
>          Components: ActiveMQ-Artemis-Native, OpenWire
>    Affects Versions: 2.16.0, 2.17.0
>            Reporter: Pierre-Henry Brasseur
>            Assignee: Gary Tully
>            Priority: Major
>         Attachments: Artemis - example-1.png, Artemis - example.png, Artemis 
> - stack traces.png, Re Question about charset supported by Artemis.msg, 
> main.c, verifyUtf.patch
>
>
> When a text message non-UTF-8 (ISO-8859-15) containing special characters is 
> sent from OpenWire, this raised an exception 
> :"java.io.UTFDataFormatException" which is not correctly handle and prevent 
> the sending of the text message.
> See email from ActiveMQ Community in attachment for more details.
> [^Re Question about charset supported by Artemis.msg] 
>  
> This was working with previous ActiveMQ version (v5.15.9).
>  
> Identified during following test :
> Text message sent from a C program using the Fuse ActiveMQ-Client C library 
> to Artemis v2.16.



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

Reply via email to