Return-Path: X-Original-To: apmail-activemq-commits-archive@www.apache.org Delivered-To: apmail-activemq-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id D78BA11FC6 for ; Sun, 27 Apr 2014 11:04:15 +0000 (UTC) Received: (qmail 30050 invoked by uid 500); 27 Apr 2014 11:04:15 -0000 Delivered-To: apmail-activemq-commits-archive@activemq.apache.org Received: (qmail 29971 invoked by uid 500); 27 Apr 2014 11:04:15 -0000 Mailing-List: contact commits-help@activemq.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@activemq.apache.org Delivered-To: mailing list commits@activemq.apache.org Received: (qmail 29964 invoked by uid 99); 27 Apr 2014 11:04:15 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 27 Apr 2014 11:04:15 +0000 Date: Sun, 27 Apr 2014 11:04:14 +0000 (UTC) From: =?utf-8?Q?=E9=9B=B7=E9=92=A6_=28JIRA=29?= To: commits@activemq.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Issue Comment Deleted] (APLO-355) Stomp Websocke example doesn't work for utf-8 String MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/APLO-355?page=3Dcom.atlassian.= jira.plugin.system.issuetabpanels:all-tabpanel ] =E9=9B=B7=E9=92=A6 updated APLO-355: -------------------- Comment: was deleted (was: I add the test case and create a pull request https://github.com/apache/activemq-apollo/pull/3 the test cast output is here : https://gist.github.com/leiqin/11342525 I notice when I send '=E4=BD=A0=E5=A5=BD' from broker to client , the clien= t receive '=C3=A4=C2=BD =C3=A5=C2=A5=C2=BD' this is something try with python shell: >>> '=E4=BD=A0=E5=A5=BD' '\xe4\xbd\xa0\xe5\xa5\xbd' >>> u'=E4=BD=A0=E5=A5=BD' u'\u4f60\u597d' >>> '=C3=A4=C2=BD =C3=A5=C2=A5' '\xc3\xa4\xc2\xbd \xc3\xa5\xc2\xa5' >>> u'=C3=A4=C2=BD =C3=A5=C2=A5' u'\xe4\xbd \xe5\xa5' >>> print u'\xe4\xbd\xa0\xe5\xa5\xbd' =C3=A4=C2=BD=C2=A0=C3=A5=C2=A5=C2=BD I think may be the borker read by byte from utf-8 string and send the bytes= as utf-8 string to websocket, and do the reverse when it receive message from websocket .) > Stomp Websocke example doesn't work for utf-8 String > ---------------------------------------------------- > > Key: APLO-355 > URL: https://issues.apache.org/jira/browse/APLO-355 > Project: ActiveMQ Apollo > Issue Type: Bug > Components: apollo-stomp > Affects Versions: 1.7 > Environment: apache-apollo-1.7 > linux debian testing > iceweasel 24.4.0 chromium 33.0.1750.152 > Reporter: =E9=9B=B7=E9=92=A6 > > when I send a utf-8 String to Char Room , it not receive what I send , f= or example: > I send : =E4=BD=A0=E5=A5=BD > the Debug Log is : > >>> SEND > destination:/topic/chat.general > content-length:2 > =E4=BD=A0=E5=A5=BD > <<< MESSAGE > subscription:sub-0 > message-id:apollo-broker-312 > destination:/topic/chat.general > content-length:2 > `} > I receive '`}' not '=E4=BD=A0=E5=A5=BD' > then , I found the content-length is not correct in utf-8 ,in utf-8 '=E4= =BD=A0=E5=A5=BD' has 6 byte . > then I change the js/stomp.js to use https://github.com/jmesnil/stomp-web= socket > I see the Debug Log is : > >>> SEND > destination:/topic/chat.general > content-length:6 > =E4=BD=A0=E5=A5=BD > the content-length is correct , but I didn't receive any message . > after a while , the Debug Log show me : > <<< ERROR > message:Expected null terminator after 6 content bytes > Whoops! Lost connection to ws://localhost:61623/ -- This message was sent by Atlassian JIRA (v6.2#6252)