{"action":"created","issue":{"url":"https://api.github.com/repos/NathanaelA/nativescript-zxing/issues/15","repository_url":"https://api.github.com/repos/NathanaelA/nativescript-zxing","labels_url":"https://api.github.com/repos/NathanaelA/nativescript-zxing/issues/15/labels{/name}","comments_url":"https://api.github.com/repos/NathanaelA/nativescript-zxing/issues/15/comments","events_url":"https://api.github.com/repos/NathanaelA/nativescript-zxing/issues/15/events","html_url":"https://github.com/NathanaelA/nativescript-zxing/issues/15","id":300710212,"number":15,"title":"Adding newline within encode data","user":{"login":"kwong93","id":9687105,"avatar_url":"https://avatars0.githubusercontent.com/u/9687105?v=4","gravatar_id":"","url":"https://api.github.com/users/kwong93","html_url":"https://github.com/kwong93","followers_url":"https://api.github.com/users/kwong93/followers","following_url":"https://api.github.com/users/kwong93/following{/other_user}","gists_url":"https://api.github.com/users/kwong93/gists{/gist_id}","starred_url":"https://api.github.com/users/kwong93/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kwong93/subscriptions","organizations_url":"https://api.github.com/users/kwong93/orgs","repos_url":"https://api.github.com/users/kwong93/repos","events_url":"https://api.github.com/users/kwong93/events{/privacy}","received_events_url":"https://api.github.com/users/kwong93/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-02-27T16:52:57Z","updated_at":"2018-02-27T18:42:38Z","closed_at":"2018-02-27T18:42:38Z","author_association":"NONE","body":"`var stringToEncode = \"First string\" + \"\\n\" + Second String\";`\r\n\r\nwhen passing to `createBarcode`\r\n```\r\nvar zx = new ZXing();\r\nvar barcode = zx.createBarcode({encode: stringToEncode, height: 30, width: 400, format: ZXing.CODE_128});\r\n```\r\nI get:\r\n\r\n```\r\nJS: Error: java.lang.IllegalArgumentException: Bad character in input:\r\nJS:     com.google.zxing.oned.Code128Writer.encode(Code128Writer.java:83)\r\n```\r\nI've tried several ways to input a newline:\r\n`String.charCodeAt(10)`\r\n`String.charCodeAt(13)`\r\n`\"\\r\\n\"`\r\n`\"\\r\"`\r\n but same error, how do I add a new line to the encode data?\r\n\r\nLooking at the src code for CodeWriter it seems the char code for the new line input is greater than 127 but why?\r\n\r\nhttps://github.com/zxing/zxing/blob/master/core/src/main/java/com/google/zxing/oned/Code128Writer.java"},"comment":{"url":"https://api.github.com/repos/NathanaelA/nativescript-zxing/issues/comments/368982526","html_url":"https://github.com/NathanaelA/nativescript-zxing/issues/15#issuecomment-368982526","issue_url":"https://api.github.com/repos/NathanaelA/nativescript-zxing/issues/15","id":368982526,"user":{"login":"NathanaelA","id":850871,"avatar_url":"https://avatars3.githubusercontent.com/u/850871?v=4","gravatar_id":"","url":"https://api.github.com/users/NathanaelA","html_url":"https://github.com/NathanaelA","followers_url":"https://api.github.com/users/NathanaelA/followers","following_url":"https://api.github.com/users/NathanaelA/following{/other_user}","gists_url":"https://api.github.com/users/NathanaelA/gists{/gist_id}","starred_url":"https://api.github.com/users/NathanaelA/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/NathanaelA/subscriptions","organizations_url":"https://api.github.com/users/NathanaelA/orgs","repos_url":"https://api.github.com/users/NathanaelA/repos","events_url":"https://api.github.com/users/NathanaelA/events{/privacy}","received_events_url":"https://api.github.com/users/NathanaelA/received_events","type":"User","site_admin":false},"created_at":"2018-02-27T18:42:38Z","updated_at":"2018-02-27T18:42:38Z","author_association":"OWNER","body":"Well based on the https://en.wikipedia.org/wiki/Code_128 the only code-128 that supported the CR or LF character is Code-128A.   If you are using Code_128A character set; you CANNOT use lowercase letters; so you basically need to tell it to do the 128A character set; and make sure that all your characters are available in the 128a character set..."}}
{"actor":{"display_login":"NathanaelA"}}