{"action":"created","issue":{"url":"https://api.github.com/repos/nodejs/io.js/issues/2190","labels_url":"https://api.github.com/repos/nodejs/io.js/issues/2190/labels{/name}","comments_url":"https://api.github.com/repos/nodejs/io.js/issues/2190/comments","events_url":"https://api.github.com/repos/nodejs/io.js/issues/2190/events","html_url":"https://github.com/nodejs/io.js/pull/2190","id":95360967,"number":2190,"title":"Add the CESU-8 encoding support","user":{"login":"pmq20","id":13315,"avatar_url":"https://avatars.githubusercontent.com/u/13315?v=3","gravatar_id":"","url":"https://api.github.com/users/pmq20","html_url":"https://github.com/pmq20","followers_url":"https://api.github.com/users/pmq20/followers","following_url":"https://api.github.com/users/pmq20/following{/other_user}","gists_url":"https://api.github.com/users/pmq20/gists{/gist_id}","starred_url":"https://api.github.com/users/pmq20/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pmq20/subscriptions","organizations_url":"https://api.github.com/users/pmq20/orgs","repos_url":"https://api.github.com/users/pmq20/repos","events_url":"https://api.github.com/users/pmq20/events{/privacy}","received_events_url":"https://api.github.com/users/pmq20/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/nodejs/io.js/labels/feature%20request","name":"feature request","color":"0D7BDE"},{"url":"https://api.github.com/repos/nodejs/io.js/labels/v8","name":"v8","color":"0052cc"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":10,"created_at":"2015-07-16T06:25:08Z","updated_at":"2015-07-20T16:37:09Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/nodejs/io.js/pulls/2190","html_url":"https://github.com/nodejs/io.js/pull/2190","diff_url":"https://github.com/nodejs/io.js/pull/2190.diff","patch_url":"https://github.com/nodejs/io.js/pull/2190.patch"},"body":"In our daily work it frequently occurs that we need to let io.js apps communicate in binary with Java apps, which necessitates the CESU-8 encoding. Details about this encoding is observed in [1]. This pull request is a quick implementation of it. One test case has been added and passed.\r\n\r\nSince it modifies the upstream v8 code, I am not sure about how to handle such kind of patches. It seems problematic to make changes naively onto the node repository. Please guide me on how to merge this code. Thank you very much!\r\n\r\n* CESU-8 stands for Compatibility Encoding Scheme for UTF-16: 8-Bit\r\n* Function VisitTwoByteString() was made virtual to call in CESU-8 mode\r\n* Added a new class CesuVisitor inheriting from Visitor\r\n* Added Smiling Face symbol as a test case\r\n* New API - String::Cesu8Length()\r\n* New String::WriteOptions - ENCODE_AS_CESU_8\r\n\r\n[1] https://en.wikipedia.org/wiki/CESU-8\r\n"},"comment":{"url":"https://api.github.com/repos/nodejs/io.js/issues/comments/122942847","html_url":"https://github.com/nodejs/io.js/pull/2190#issuecomment-122942847","issue_url":"https://api.github.com/repos/nodejs/io.js/issues/2190","id":122942847,"user":{"login":"Fishrock123","id":1093990,"avatar_url":"https://avatars.githubusercontent.com/u/1093990?v=3","gravatar_id":"","url":"https://api.github.com/users/Fishrock123","html_url":"https://github.com/Fishrock123","followers_url":"https://api.github.com/users/Fishrock123/followers","following_url":"https://api.github.com/users/Fishrock123/following{/other_user}","gists_url":"https://api.github.com/users/Fishrock123/gists{/gist_id}","starred_url":"https://api.github.com/users/Fishrock123/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Fishrock123/subscriptions","organizations_url":"https://api.github.com/users/Fishrock123/orgs","repos_url":"https://api.github.com/users/Fishrock123/repos","events_url":"https://api.github.com/users/Fishrock123/events{/privacy}","received_events_url":"https://api.github.com/users/Fishrock123/received_events","type":"User","site_admin":false},"created_at":"2015-07-20T16:37:09Z","updated_at":"2015-07-20T16:37:09Z","body":"I'm less than sure this is the kind of thing that belong in core/v8 strings; Afaik Javascript strings are strictly UTF-8 (and/or any subset of UTF-8). If it doesn't comply to that, isn't it best to just keep it to buffers?"}}