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

Display original utf-8 string #11

Open
sodastsai opened this issue Mar 5, 2012 · 4 comments
Open

Display original utf-8 string #11

sodastsai opened this issue Mar 5, 2012 · 4 comments

Comments

@sodastsai
Copy link

Hello, I'm a happy user with your safari extension.
I'm a iOS and django developer.
The django side will output JSON format to iOS side.
Your extension helps me a lot while checking the content django returned.

But currently, I have to check some JSON output with some UTF-8 Chinese string.
for example:
{"patientType": "\u9580\u8a3a"}
which should be
{"patientType": "門診"}

I have no idea how to solve this in an extension development.
But I hope one day I can use your extension for checking JSON with non-English content.
Thanks very much.

@sodastsai
Copy link
Author

I found that it's quite easy fix this by adding a line
obj = eval('"'+obj+'"');
in renderString function before the return line.
the eval will make \u9580 to its original value in Chinese.

@ramm
Copy link

ramm commented Mar 27, 2012

Yeah, this is a bit frustrating.

@tianxingxia-cn
Copy link

我也遇到同样问题。

@iplus26
Copy link

iplus26 commented Feb 26, 2016

For any one who wants a simple solution, check out this fork by @drfisher

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

4 participants