0 votes
func _on_YELLOW_request_completed(result, response_code, headers, body):
    if response_code==0:

    var response_body = JSON.parse(body.get_string_from_ascii()).result as Dictionary
    var json = JSON.parse(body.get_string_from_ascii())
    for i in response_body.fields:
        for ii in response_body.fields\[i\]\["arrayValue"\]\["values"\].size():
            for iii in response_body.fields\[i\]\["arrayValue"\]\["values"\]\[ii -1\]:
                data.append(response_body.fields\[i\]\["arrayValue"\]\["values"\]\[ii -1\]\[iii\])
        var num = int(data\[2\])
        var num2
        if data\[1\] == "true":
            num2 = num / 5
            num2 = num
        YELLOW\[int(data\[0\])\] = \[num2,data\[3\],data\[4\],data\[5\],data\[6\],data\[7\],data\[8\]\]

this is what it writes in print(data)

what it should write
what it should write

Godot version 3.2.3
in Engine by (24 points)
reshown by

1 Answer

0 votes
Best answer

I think that Godot doesn't very well support [some] utf-8 characters, maybe also not Russian (although I haven't fact-checked this). It also may not be Godot altogether, It could be somewhere in the translation code. Something that might be of use, is trying to print Russian characters to the console, and seeing if they are printed properly. Another thing is, if the English characters are mapped directly to the Russian letters, then you could create a dictionary from English to Russian chars.

Also, a while back, I tried to use utf-8 characters in the inspector, and they came out as unreadable characters, so I don't know if those are related or something...

If all the above fail, you could take a screenshot where you know that the data is reliable (perhaps a python script or something), then crop it to the text, then use tensorflow or keras (or some other ML/Deep Learning framework), and parse it to text, then you can write it to a file, then read it in with gdscript, and you have the data! (Obviously this is over the top, but it is doable! (hopefuly you have already solved it though)!

by (272 points)
selected by
Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to webmaster@godotengine.org with your username.