Seems json_decode() doesn't have unicode support.
When you use json_encode, it stores data, but decoding it with json_decode() removes all Cyrillic and unicode chars.
Numbered Steps to Reproduce Problem:
1. use json_encode() to encode unicode message.
2. use json_decode() to decode encoded message.
Code Snippet (if applicable) to Reproduce Problem:
var/list/msg = list("message" = "abc Вкусные hij пирожки efg")
var/json_string = json_encode(msg)
world.log << "1 [json_string]"
msg = json_decode(json_string)
world.log << "2 [msg["message"]]"
Expected Results:
1 {"message":"abc \u0412\u043a\u0443\u0441\u043d\u044b\u0435 hij \u043f\u0438\u0440\u043e\u0436\u043a\u0438 efg"}
2 abc Вкусные hij пирожки efg
Actual Results:
1 {"message":"abc \u0412\u043a\u0443\u0441\u043d\u044b\u0435 hij \u043f\u0438\u0440\u043e\u0436\u043a\u0438 efg"}
2 abc hij efg
Does the problem occur:
Every time? Or how often? Every time when you use json_decode()
In other games? Yes.
In other user accounts? Yes
On other computers? Yes.
When does the problem NOT occur?
It occurs every time when you use json_decode with unicode chars.
Did the problem NOT occur in any earlier versions? If so, what was the last version that worked? (Visit http://www.byond.com/download/build to download old versions for testing.)
Don't know.
Workarounds: Didn't use.