Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support non-ASCII characters #44

Open
shrx opened this issue Nov 30, 2015 · 4 comments
Open

Support non-ASCII characters #44

shrx opened this issue Nov 30, 2015 · 4 comments

Comments

@shrx
Copy link

shrx commented Nov 30, 2015

Non-ASCII sharacters don't parse correctly:

$ cat test.txt                    
["čšž"]
$ cat test.txt|jsawk
["�šž"]
@gizmo174
Copy link

gizmo174 commented Dec 1, 2015

Debian 2.6.39
ii spidermonkey-bin 1.9.1.16-20
cat /tmp/t | jsawk 'this.age++'
[{"first":"алалал","last":"345345пвапва","from":"england","age":53,"sports":["rugby","badmitton","snooker"]}]


Debian 4.2.0
ii libmozjs-24-dev 24.2.0-2
cat /tmp/t | jsawk 'this.age++'
[{"first":"алалал","last":"345345пвапва","from":"england","age":53,"sports":["rugby","badmitton","snooker"]}]

libmozjs don't working correctly?

@shrx
Copy link
Author

shrx commented Dec 1, 2015

I have libmozjs-24-dev 24.2.0-3ubuntu1.

shrx added a commit to shrx/jsawk that referenced this issue Dec 2, 2015
@shrx
Copy link
Author

shrx commented Dec 2, 2015

I have added a possible fix for this in the pull request (not thoroughly tested but it works for me)

@gizmo174
Copy link

gizmo174 commented Dec 3, 2015

shrx, Thank you help me
ps: if need use an after script (-a option) then use cat ./test | jsawk -a 'return decodeURIComponent(escape(this[0].name))'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants