memtimintursun / aspjson

Automatically exported from code.google.com/p/aspjson
0 stars 0 forks source link

How to disable escaping Unicode characters? #35

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
When using aspjson to send UTF-8 Unicode characters, JSON_2.0.4.asp converts 
them to escaped characters. Is there a way to escape everything except the 
Unicode characters?
For example I want to create a JSON object:
"1 A: Test Subsection 充电系统"
But this tool escapes the Unicode chars and creates the JSON as this instead:
"1 A: Test Subsection \u5145\u7535\u7CFB\u7EDF"

The web browser can display it correctly both ways, but I still want to turn 
off escaping Unicode characters. This way I can send the JSON without the 
characters escaped.

Original issue reported on code.google.com by jodek...@gmail.com on 27 Mar 2015 at 7:42

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
I modified the source to give an extra parameter for encoding. Take a look at 
function

Function jsEncode(str)

I added anoter function with 2 args 
Function jsEncode(str, escape) and I call this instead of Function jsEncode(str)

Original comment by epimar...@gmail.com on 29 Mar 2015 at 12:15

Attachments: