when I receive data from firestore it does not display Russian letters

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By andreu33
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

:bust_in_silhouette: Reply From: Snail0259

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)!