Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id D9F79200B7E for ; Tue, 23 Aug 2016 00:19:22 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id D8D1F160AB3; Mon, 22 Aug 2016 22:19:22 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 08EC2160AC5 for ; Tue, 23 Aug 2016 00:19:21 +0200 (CEST) Received: (qmail 41553 invoked by uid 500); 22 Aug 2016 22:19:21 -0000 Mailing-List: contact issues-help@cordova.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Delivered-To: mailing list issues@cordova.apache.org Received: (qmail 41294 invoked by uid 99); 22 Aug 2016 22:19:21 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 22 Aug 2016 22:19:21 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id D00002C0150 for ; Mon, 22 Aug 2016 22:19:20 +0000 (UTC) Date: Mon, 22 Aug 2016 22:19:20 +0000 (UTC) From: "Chris Brody (JIRA)" To: issues@cordova.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (CB-9435) cordova-ios cannot handle Unicode U+2028 (line separator) or U+2029 (paragraph separator) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Mon, 22 Aug 2016 22:19:23 -0000 [ https://issues.apache.org/jira/browse/CB-9435?page=3Dcom.atlassian.ji= ra.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=3D1543170= 5#comment-15431705 ]=20 Chris Brody commented on CB-9435: --------------------------------- I filed a similar issue: CB-11737 I will understand if the Cordova project does not want to fix this but hope= they will be documented. > cordova-ios cannot handle Unicode U+2028 (line separator) or U+2029 (para= graph separator) > -------------------------------------------------------------------------= ---------------- > > Key: CB-9435 > URL: https://issues.apache.org/jira/browse/CB-9435 > Project: Apache Cordova > Issue Type: Bug > Components: iOS > Reporter: Chris Brody > Assignee: Jesse MacFadyen > Labels: cordova-ios-4.0.x > > In https://github.com/litehelpers/Cordova-sqlite-storage/issues/147 someo= ne reported that my sqlite plugin could not handle \u2028 characters on iOS= , and further testing on my part isolated this to the result callback messa= ge. I made a version of cordova-ext-echo at https://github.com/brodybits/co= rdova-ext-echo-and-length that can be used to demonstrate this issue cordov= a-ios. > If I install the plugin from https://github.com/brodybits/cordova-ext-ech= o-and-length and run the following code on the iOS version: > {code} > var Echo =3D cordova.require('org.apache.cordova.plugins.echo.Ech= o'); > Echo.echo('first\u2027second', function(v) { > console.log('cb 1: ' + v); > }); > Echo.echo('third\u2028fourth', function(v) { > console.log('cb 2: ' + v); > }); > Echo.echo('fifth\u2029six', function(v) { > console.log('cb 3: ' + v); > }); > Echo.len('first\u2027second', function(v) { > console.log('len cb 1: ' + v); > }); > Echo.len('third\u2028fourth', function(v) { > console.log('len cb 2: ' + v); > }); > Echo.len('fifth\u2029six', function(v) { > console.log('len cb 3: ' + v); > }); > {code} > I get the following result: > {code} > 2015-07-31 01:21:11.968 cijt[25760:18e03] cb 1: first=E2=80=A7second > 2015-07-31 01:21:11.971 cijt[25760:18e03] len cb 1: 12 > 2015-07-31 01:21:11.973 cijt[25760:18e03] len cb 2: 12 > 2015-07-31 01:21:11.973 cijt[25760:18e03] len cb 3: 9 > {code} > We can see that we can send a string with U+2028 and U+2029 from Javascri= pt to Objective-C with no problems: if Objective-C calculates and returns t= he length it works but if Objective-C tries to send the same string back to= Javascript it fails. > I discovered the following article that seems to describe the cause: http= ://timelessrepo.com/json-isnt-a-javascript-subset (Cordova does seem to han= dle the \u000A and \u000D characters OK.) > When I ran the same test program on Android (with the same plugin install= ed), I get all of the callbacks ok (trace filtered by hand): > {code} > I/chromium(14744): [INFO:CONSOLE(173)] "cb 1: first=E2=80=A7second", sour= ce: file:///android_asset/www/plugins/cordova-plugin-console/www/console-vi= a-logger.js (173) > I/chromium(14744): [INFO:CONSOLE(173)] "cb 2: third=E2=80=A8fourth", sour= ce: file:///android_asset/www/plugins/cordova-plugin-console/www/console-vi= a-logger.js (173) > I/chromium(14744): [INFO:CONSOLE(173)] "cb 3: fifth=E2=80=A9six", source:= file:///android_asset/www/plugins/cordova-plugin-console/www/console-via-l= ogger.js (173) > I/chromium(14744): [INFO:CONSOLE(173)] "len cb 1: 12", source: file:///an= droid_asset/www/plugins/cordova-plugin-console/www/console-via-logger.js (1= 73) > I/chromium(14744): [INFO:CONSOLE(173)] "len cb 2: 12", source: file:///an= droid_asset/www/plugins/cordova-plugin-console/www/console-via-logger.js (1= 73) > I/chromium(14744): [INFO:CONSOLE(173)] "len cb 3: 9", source: file:///and= roid_asset/www/plugins/cordova-plugin-console/www/console-via-logger.js (17= 3) > {code} -- This message was sent by Atlassian JIRA (v6.3.4#6332) --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org For additional commands, e-mail: issues-help@cordova.apache.org