Closed thefyLoX closed 1 year ago
It appears that file_read_backwards only supports ascii, latin-1 and utf-8
Adding latin-1 encoding in line 33 of chat.py seems to solve it for us (barely tested in a live server):
with FileReadBackwards(files[0], encoding="latin-1") as f:
you can also just add 'ignore' as the third param if you want to keep the encoding as 'utf-8' then instead of throwing an error it just skips the character
you can also just add 'ignore' as the third param if you want to keep the encoding as 'utf-8' then instead of throwing an error it just skips the character
We'd rather get the whole text on Discord, but I will try adding this third param just in case, while keeping latin-1 encoding.
Thank you!
I haven't been able to make 'ignore' work but we haven't had problems since we switched to 'latin-1' encoding.
Our server has people writing in chat in multiple languages and this change was needed. Is there a chance to implement it into the main branch for future updates?
Thanks in advance
Sure, I'll see if I can do that today
Believe this should be fixed by #44 which is now merged
We are getting error messages from time to time that seem to stop the chat processing in its tracks. In our case it's often related to a faction with the acute accent ´ (it corresponds to 0xb4) in its name. It seems that whenever their faction name shows up (at server start or when one of their members join) it crashes:
The exeption above corresponds to these lines in the chat log:
It seems that the game-to-discord flow is interrupted after that (events etc. keep getting notified) and we need to manually restart zomboi.py
The nature of this exception suggests that other characters may cause similar crashes. We are running the server on Windows and the chat log appears to be codified in ANSI instead of UTF8