Skip to content

json.Unmarshal doesn't properly decodes escaped Unicode characters #73

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

Closed
dchest opened this issue Nov 12, 2009 · 3 comments
Closed

json.Unmarshal doesn't properly decodes escaped Unicode characters #73

dchest opened this issue Nov 12, 2009 · 3 comments

Comments

@dchest
Copy link
Contributor

dchest commented Nov 12, 2009

What steps will reproduce the problem?

s := `{"tweets" : [{"text" :
"\u0422\u0443\u043b\u0430"}]}`;
json.Unmarshal(s, &timeline);

See attached json-test.go.


What is the expected output? What do you see instead?

Expected: text should be unmarshalled to "Тула".
Instead: empty string


Which revision are you sync'ed to?  (hg log -l 1)
changeset:   3960:de1a91a5a801
tag:         tip
user:        Russ Cox <[email protected]>
date:        Tue Nov 10 17:09:33 2009 -0800
summary:     net: fix dns bug reported on irc.

Attachments:

  1. json-test.go (500 bytes)
@dchest
Copy link
Contributor Author

dchest commented Nov 12, 2009

Comment 1:

GOOS/GOARCH: darwin/amd64
Also in changeset:   3999:7ff538707c3f

@agl
Copy link
Contributor

agl commented Nov 12, 2009

Comment 2:

Labels changed: added package-bug.

Owner changed to [email protected].

Status changed to Started.

@agl
Copy link
Contributor

agl commented Nov 12, 2009

Comment 3:

This issue was closed by revision 3b092fe.

Status changed to Fixed.

Merged into issue #-.

This issue was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants