DDLC Polish translation has utf8 problems which I don't know how to fix / deal with

Discuss how to use the Ren'Py engine to create visual novels and story-based games. New releases are announced in this section.
Forum rules
This is the right place for Ren'Py help. Please ask one question per thread, use a descriptive subject like 'NotFound error in option.rpy' , and include all the relevant information - especially any relevant code and traceback messages. Use the code tag to format scripts.
Post Reply
Message
Author
bicyclesonthemoon
Newbie
Posts: 3
Joined: Sun Apr 15, 2018 12:38 pm
Contact:

DDLC Polish translation has utf8 problems which I don't know how to fix / deal with

#1 Post by bicyclesonthemoon »

Hello,
Here it was recommended to me that this is the right place to post the following words.

My sister wanted to play a game made with RenPy, Doki Doki Literature Club.
The English in the game is not understandable enough for her to enjoy this game which is literally made of words.
Luckily, there is a Polish translation available.
I promised that I will install the translation for her.

The translation is downloadable from here:
https://drive.google.com/file/d/1HQkCVj ... sp=sharing
It's installed by unpacking the files from the rar and replacing original game's files with them.
It's made for the game in version 1.1.0 but recently the game was updated to 1.1.1 and 1.1.0 can't be found anywhere anymore.
But I have the game .zip downloaded before this so that was not a problem.

There was, however, another problem.
The translation is not working on her computer.
It's not working any computer with Gnu/Linux I checked.
It is working on Windows.
The original game is working on her computer without any problems.

This is the the message I'm seeing (on my computter, but it's the same):

Code: Select all

I'm sorry, but an uncaught exception occurred.

While running game code:
  File "game/script-poemgame.rpy", line 1, in script
  File "game/script-poemgame.rpy", line 27, in <module>
UnicodeDecodeError: 'utf8' codec can't decode bytes in position 4-5: invalid continuation byte

-- Full Traceback ------------------------------------------------------------

Full traceback:
  File "/b/game/doki/pl/DDLC-1.1.0-pc/renpy/bootstrap.py", line 295, in bootstrap
    renpy.main.main()
  File "/b/game/doki/pl/DDLC-1.1.0-pc/renpy/main.py", line 419, in main
    game.context().run(node)
  File "game/script-poemgame.rpy", line 1, in script
  File "/b/game/doki/pl/DDLC-1.1.0-pc/renpy/ast.py", line 814, in execute
    renpy.python.py_exec_bytecode(self.code.bytecode, self.hide, store=self.store)
  File "/b/game/doki/pl/DDLC-1.1.0-pc/renpy/python.py", line 1719, in py_exec_bytecode
    exec bytecode in globals, locals
  File "game/script-poemgame.rpy", line 27, in <module>
  File "/home/tom/ab/x64lucid-deps/install/lib/python2.7/encodings/utf_8.py", line 16, in decode
UnicodeDecodeError: 'utf8' codec can't decode bytes in position 4-5: invalid continuation byte

Linux-4.9.0-4-686-i686-with-debian-9.3
Ren'Py 6.99.12.4.2187
Doki Doki Literature Club! 1.1.0

I'm not familiar with RenPy but even for me it is clear that (at east) one of the fies from the translation has problem with incorrect utf8 encoding.
So I have to find the file and fix it. (and maybe discover that the game will then crash on the next file).
If I'm reading this correctly, script-poemgame.rpy should be the problematic file.
Only that there is no such file.

I do some reading and find out about .rpa files.
With rpatool I extract script-poemgame.rpyc from scripts.rpa.
That's still not it since .rpyc is a compressed .rpy, apparently.
With unrpyc I extract script-poemgame.rpy from script-poemgame.rpyc.
Then I use iconv to see where are the problems with utf8 in this file.
There are none.
What?

So it was not this file.
I'm sttuck here, what now?
The traceback,txt does not provide me with any more helfpful information.
So, do I have to extract all the .rpa files,
then uncompress all the .rpyc files,
then validate each file for correct utf?

Or maybe during all the extraction I had to do the file was somehow fixed?
What to do then?

Also, if I manage to find the file(s) I don't know how to re-compress it to .rpyc again and add back to the .rpa.

And also I'm wondering why it's working on Windows but not on Linux.
After all it's running the same python scripts (and renpy scripts) so it should behave exactly the same.
But it doesn't.
My guess would be that the systems have different versions of python or whatever libraries the game needs.
But I sere that a game released in RenPy like this one comes with its own Python so it should be the same version everywhere.
So I really don't know why Windows can ignore the utf8 problems but Linux can't.
Maybe can I make that Linux will ignore it too?

User avatar
Alex
Lemma-Class Veteran
Posts: 3093
Joined: Fri Dec 11, 2009 5:25 pm
Contact:

Re: DDLC Polish translation has utf8 problems which I don't know how to fix / deal with

#2 Post by Alex »

Just a thought... Since you've unrpa all the files and unrpyc the script files already - try to launch the game like a project in Ren'Py launcher (create a project and copy/paste all assets into it). Also, rpy-files are just text files, so check the encoding and save them in utf-8 if needed.

bicyclesonthemoon
Newbie
Posts: 3
Joined: Sun Apr 15, 2018 12:38 pm
Contact:

Re: DDLC Polish translation has utf8 problems which I don't know how to fix / deal with

#3 Post by bicyclesonthemoon »

To make it work i converted to utf8 iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii.txt, SLYSZYSZ MNIE''.txt and poemwords.txt which were in scripts.rpa.
It was successful
.
From these files only poemwords.txt is important. Others are just copied by the game.
The Error message didn't say that poemwords.txt is the problematic file.
I do now see this line "File "game/script-poemgame.rpy", line 27, in <module>" and reading the script near the line will indeed suggest poemwords.txt but I only know it after I found out what's wrong.

Anyway, the translation works now so that's a success.

Post Reply

Who is online

Users browsing this forum: No registered users