AGTTeam/OokamiTranslation

bin_input.txt error

Closed this issue · 5 comments

F:\GameTranslate\SpiceWolfNDS\d>tool.exe repack
OokamiTranslation version 1.5.2
Repacking BIN from data/bin_input.txt ...
Traceback (most recent call last):
  File "tool.py", line 122, in <module>
    common.cli()
  File "lib\site-packages\click\core.py", line 829, in __call__
  File "lib\site-packages\click\core.py", line 782, in main
  File "lib\site-packages\click\core.py", line 1259, in invoke
  File "lib\site-packages\click\core.py", line 1066, in invoke
  File "lib\site-packages\click\core.py", line 610, in invoke
  File "tool.py", line 59, in repack
    repack_bin.run(firstgame)
  File "repack_bin.py", line 32, in run
    nds.repackBIN(binrange, freeranges, game.detectShiftJIS, game.writeBINShiftJIS, "cp932", "#", binin, binout)
  File "lib\site-packages\hacktools\nds.py", line 86, in repackBIN
  File "lib\site-packages\hacktools\common.py", line 696, in repackBinaryStrings
  File "game.py", line 122, in writeBINShiftJIS
    return writeShiftJIS(f, s, False, True, maxlen, encoding)
  File "game.py", line 91, in writeShiftJIS
    f.write(c.encode(encoding))
UnicodeEncodeError: 'cp932' codec can't encode character '\uc774' in position 0: illegal multibyte sequence
[5076] Failed to execute script tool

全てのデータを消去しますか?=is this english?
If I repackage like this, the repackage will proceed normally.

全てのデータを消去しますか?=이것은 한국어입니다?
But, if I write sentences in Korean, the repack will not work properly.

edit dat_input.txt and wsb_input.txt is nicely work.
But bin_input.txt does not.
Did I make a mistake?

If I translate dat_input.txt and wsb_input.txt into Korean / translate bin_input.txt into English, repack is proceeding normally.
So I think there is no problem with the fontconfig.txt.

I'm sorry to keep bothering you.

Should be fixed in 1.5.3, let me know if it works.

I should mention that there's some functionality in the dat files repack that relies on the text being ASCII, so I've also added a new option that you should use when you repack:
tool repack --no-redirect

Thank you!
I've been having a hard time translating because I don't know how to use a pointer, but now I can do it much easier!

What does the --no-redirect option mean?
Do I no longer have to delete the control code I mentioned earlier?

<LUNK (0700)=>
<L=>
<LR=>
<LUNK(C602)UNK(022F)script/event/ev_act/bend_ending.wsb=>
<%02d.NCLR=>
<芸UNK(0402)||UNK(0402)l|UNK(0402)=>
<LL pointer is passed.=>
<LpFlg: parameter error=>
<LVL=>

For the gossip.dat file, if the lines are longer than what can fit the text is extended to a section of ROM, however that doesn't play well with the text not being ASCII, so you should use the --no-redirect option to avoid errors.

I'll close this but feel free to reopen if you still have issues.

nice work! thanks!