❔ Convert unicode characters in json value to Japanese or Chinese or Korean characters.

How may I do this?
15 Replies
KKSK@🌸🎵🌸🎵🌸
what do you mean?
KKSK@🌸🎵🌸🎵🌸
this is the code
ero
ero2y ago
I mean this is something to do with decompiled obfuscated code I'm not even sure they should be helped Hard to say
KKSK@🌸🎵🌸🎵🌸
I knew this method with Newtonsoft and System.Text.Json. That was what I was doing originally. Console.WriteLine(JsonConvert.SerializeObject(JsonConvert.DeserializeObject(text))); But this does not seem to work with all serializer such as Quartz, Net, and LitJson But what I wanted to know is what did the serializer actually do to have unicode to valid characters I have no idea what you up to. But, if you have no idea about the situation don't guess to make yourself feel wise. Just like some people not being born is better than being born. I just checked Newtonsoft and it seems like it takes in the value and decode them separately. I guess that's why when throwing a raw json mixed with unicode does not work
qqdev
qqdev2y ago
Never heard of LitJSON https://github.com/LitJSON/litjson Does not seem to be popular either Just stick to STJ or Newtonsoft
ero
ero2y ago
What a fucking thing to say wtf lmfao
KKSK@🌸🎵🌸🎵🌸
There is also Net.Json
qqdev
qqdev2y ago
All I can say is: Stick to battle-tested stuff because safe deserialization is hard and you don't want bad things to happen
KKSK@🌸🎵🌸🎵🌸
System.Text.RegularExpressions.Regex.Unescape(text)
System.Text.RegularExpressions.Regex.Unescape(text)
This is the real solution
MODiX
MODiX2y ago
KKSK@🌸🎵🌸🎵🌸#5391
REPL Result: Success
string text = "\u6f06\u9ed2\u306e\u7ffc";
System.Text.RegularExpressions.Regex.Unescape(text)
string text = "\u6f06\u9ed2\u306e\u7ffc";
System.Text.RegularExpressions.Regex.Unescape(text)
Result: string
漆黒の翼
漆黒の翼
Compile: 452.464ms | Execution: 29.619ms | React with ❌ to remove this embed.
Accord
Accord2y ago
Was this issue resolved? If so, run /close - otherwise I will mark this as stale and this post will be archived until there is new activity.
Want results from more Discord servers?
Add your server