[x3d-public] Need to agree on setContent string encoding in Java (backslashes).
John Carlson
yottzumm at gmail.com
Sun Dec 31 19:05:08 PST 2017
Note, that I believe that Don’s Java encoding produces correct XML, and mine does not. We need to weigh the standard against practical engineering.
Sent from Mail for Windows 10
From: John Carlson
Sent: Sunday, December 31, 2017 10:01 PM
To: Don Brutzman; x3d-public at web3d.org
Subject: Need to agree on setContent string encoding in Java (backslashes).
Don, we need to agree on setContent string encoding in Java, particularly \’s.: I would also think that \n would be encoded as \n in Java, but I seem to recall some issues with that.
Don’s Java
.addMeta(new metaObject().setName("description").setContent("a script test with embedded \\n between single quotes, a double backslash \\\\\\\\ a backslash \\\\ and a closing quote \"")))
John’s Java:
.addMeta(new metaObject().setName("description").setContent("a script test with embedded \\n between single quotes, a double backslash \\\\ a backslash \\ and a closing quote \"")))
X3D XML:
<meta name='description' content='a script test with embedded \n between single quotes, a double backslash \\\\ a backslash \\ and a closing quote "'/>
X3D JSON:
{
"@name":"description",
"@content":"a script test with embedded \n between single quotes, a double backslash \\\\ a backslash \\ and a closing quote \""
},
Please advise! More to follow.
John
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://web3d.org/pipermail/x3d-public_web3d.org/attachments/20171231/cc1c5293/attachment-0001.html>
More information about the x3d-public
mailing list