project-yuki / YUKI

YUKI Galgame Translator
GNU General Public License v3.0
1.51k stars 144 forks source link

游戏启用Mecab后抓取文字乱码 #66

Open arition opened 4 years ago

arition commented 4 years ago

游戏

アオナツライン,V1.04,使用AlhpaROM Cracker破解

问题

在不启用Mecab时可以正常获取无乱码文本,启用Mecab后获取文本全部乱码。使用的是YUKI文档里提供的Mecab版本。是否使用Locale emulator转区均对文本抓取无影响。

截图

禁用Mecab

禁用Mecab

启用Mecab

启用Mecab

tinyAdapter commented 4 years ago

啊?为什么会有这种情况……

按理说启用mecab又不影响文本内容……

能截一下debug日志么?还有用的是哪个版本的YUKI?

arition commented 4 years ago

用的是 YUKI minori v0.14,当前最新版。系统是Windows 10, 1909

调试日志有文本输出的地方吗?UI里的日志没法复制……

最开始是这样 image

image

最后是这样 image

tinyAdapter commented 4 years ago

用cmd运行YUKI.exe,这样会把日志显示在命令行中,然后拷贝一份下来?

tinyAdapter commented 4 years ago

开启mecab和不开mecab的日志都来一份吧,这样方便比对

arition commented 4 years ago

禁用Mecab

  yuki:app __dirname: C:\Program Files M\YUKI\resources\app.asar\dist\electron +0ms
  yuki:app basePath: C:\Program Files M\YUKI +2ms
  yuki:app appPath: C:\Program Files M\YUKI\resources\app.asar +0ms
  yuki:app mainWinURL: file://C:\Program Files M\YUKI\resources\app.asar\dist\electron/index.html +0ms
  yuki:config C:\Program Files M\YUKI\config\config.json saved +0ms
  yuki:config C:\Program Files M\YUKI\config\config.json loaded with pre-save +1ms
  yuki:config C:\Program Files M\YUKI\config\games.json saved +3ms
  yuki:config C:\Program Files M\YUKI\config\games.json loaded with pre-save +0ms
  yuki:config C:\Program Files M\YUKI\config\texts.json saved +2ms
  yuki:config C:\Program Files M\YUKI\config\texts.json loaded with pre-save +0ms
  yuki:config C:\Program Files M\YUKI\config\gui.json saved +3ms
  yuki:config C:\Program Files M\YUKI\config\gui.json loaded with pre-save +1ms
  yuki:downloader:factory library base repo -> https://github.com/project-yuki/libraries/raw/master/_pack/ +0ms
  yuki:downloader:factory library base store path -> C:\Program Files M\YUKI\lib +0ms
  yuki:app creating window... +66ms
  yuki:ipc request config config +0ms
  yuki:ipc request config config +94ms
  yuki:ipc request config games +0ms
  yuki:ipc main page load finished. starting apis... +1ms
  yuki:api external file C:\Program Files M\YUKI\config\baiduApi.js loaded +0ms
  yuki:api external file C:\Program Files M\YUKI\config\youdaoApi.js loaded +1ms
  yuki:api external file C:\Program Files M\YUKI\config\azureApi.js loaded +3ms
  yuki:api external file C:\Program Files M\YUKI\config\qqApi.js loaded +3ms
  yuki:ipc apis started +9ms
  yuki:game choose Locale Emulator as locale changer +0ms
  yuki:game exec string: "C:\Program Files M\Locale Emulator\LEProc.exe" "E:\_galgame\GIGA\Aonatsu\Aonatsu.exe" +0ms
  yuki:game finding pid of Aonatsu.exe... +10ms
  yuki:game found game. pids [ 23984 ] +1s
  yuki:hooker trying to access CLI exe at C:\Program Files M\YUKI\lib\textractor\TextractorCLI.exe +0ms
  yuki:merger initialized true +0ms
  yuki:textInterceptor initialized +0ms
  yuki:textInterceptor initialized +0ms
  yuki:mecab disabled +0ms
  yuki:hooker application builded +2ms
  yuki:hooker injecting process 23984... +8ms
  yuki:hooker process 23984 injected +1ms
  yuki:win32 registering process exit callback at pid 23984... +0ms
  yuki:win32 process handle: 2580 +1ms
  yuki:win32 process exit callback registered +2ms
  yuki:translatorWindow alwaysOnTop -> true +0ms
  yuki:ipc request config config +5s
  yuki:translatorWindow subscribing hooker events... +514ms
  yuki:publish webContents YUKI Galgame Translator successfully subscribed type has-hook-text +0ms
  yuki:translatorWindow hooker events subscribed +1ms
  yuki:filter [0] Textractor:pipeconnectedTextractor:hijackingprocesslocatedfrom0x00400000to0x00F6E000Textractor:insertinghook:GetTextExtentPoint32ATextractor:insertinghook:GetTextExtentExPointATextractor:insertinghook:GetCharacterPlacementATextractor:insertinghook:GetGlyphIndicesATextractor:insertinghook:GetGlyphOutlineATextractor:insertinghook:ExtTextOutATextractor:insertinghook:TextOutA +0ms
  yuki:ipc request config config +76ms
  yuki:ipc request config { name: 'Aonatsu', code: '', path: 'E:\\_galgame\\GIGA\\Aonatsu\\Aonatsu.exe', localeChanger: 'localeEmulator' } +0ms
  yuki:ipc request config gui +2ms
  yuki:filter [0] Textractor:insertinghook:GetCharABCWidthsATextractor:insertinghook:GetCharABCWidthsFloatATextractor:insertinghook:GetCharWidth32ATextractor:insertinghook:GetCharWidthFloatATextractor:insertinghook:GetTextExtentPoint32WTextractor:insertinghook:GetTextExtentExPointWTextractor:insertinghook:GetCharacterPlacementW +518ms
  yuki:filter [0] Textractor:insertinghook:GetGlyphIndicesWTextractor:insertinghook:GetGlyphOutlineWTextractor:insertinghook:ExtTextOutWTextractor:insertinghook:TextOutWTextractor:insertinghook:GetCharABCWidthsWTextractor:insertinghook:GetCharABCWidthsFloatWTextractor:insertinghook:GetCharWidth32W +525ms
  yuki:filter [0] Textractor:insertinghook:GetCharWidthFloatWTextractor:insertinghook:DrawTextATextractor:insertinghook:DrawTextExATextractor:insertinghook:TabbedTextOutATextractor:insertinghook:GetTabbedTextExtentATextractor:insertinghook:DrawTextWTextractor:insertinghook:DrawTextExWTextractor:insertinghook:TabbedTextOutW +521ms
  yuki:filter [0] Textractor:insertinghook:GetTabbedTextExtentW +520ms
  yuki:filter [0] vnreng:INSERTNeXASTextractor:insertinghook:NeXAS +3s
  yuki:filter [3] <<NODATA>>※ホイールクリックでデータ保護 +7s
  yuki:filter [4] <<NODATA>>※ホイールクリックでデータ保護 +0ms
  yuki:filter [2] <<NODATA>>※ホイールクリックでデータ保護 +0ms
  yuki:filter [5] 駅からやってくる生徒たちも加わり、通学路も賑やかになってくる。 +4s
  yuki:filter [4] 駅からやってくる生徒たちも加わり、通学路も賑やかになってくる。1番をロードしました +2ms
  yuki:filter [3] 駅からやってくる生徒たちも加わり、通学路も賑やかになってくる。1番をロードしました +0ms
  yuki:filter [6] 1番をロードしました +453ms
  yuki:filter [4] 打って変わって、ここから校門までは上り坂。ここまで高低差が激しいと、自転車通学する気力など湧かない。 +526ms
  yuki:filter [3] 打って変わって、ここから校門までは上り坂。ここまで高低差が激しいと、自転車通学する気力など湧かない。 +1ms
  yuki:filter [7] 打って変わって、ここから校門までは上り坂。ここまで高低差が激しいと、自転車通学する気力など湧かない。 +1ms
  yuki:filter [3] 「それでさ、昨夜もあれから考えたんだけど……」海希 +2s
  yuki:filter [4] 「それでさ、昨夜もあれから考えたんだけど……」海希 +1ms
  yuki:filter [7] 「それでさ、昨夜もあれから考えたんだけど……」海希 +0ms
  yuki:filter [11] ゲームを終了しますか? +4s
  yuki:filter [10]  +1ms
  yuki:filter [8]  +6ms
  yuki:filter [9] <HV1R +0ms
  yuki:filter [8]  +930ms
  yuki:filter [9] <HV<HV +1ms
  yuki:publish webContents YUKI Galgame Translator successfully unsubscribed type has-hook-text +26s
  yuki:translatorWindow saving translator window bounds -> { x: 2183, y: 267, width: 1364, height: 648 } +26s
  yuki:translatorWindow saving translator window alwaysOnTop -> true +0ms
  yuki:config C:\Program Files M\YUKI\config\gui.json saved +31s
  yuki:config gui changed. reloading... +28ms
  yuki:ipc reloading config gui +25s
  yuki:config gui changed. reloading... +3ms
  yuki:ipc reloading config gui +3ms
  yuki:config gui changed. reloading... +1ms
  yuki:ipc reloading config gui +1ms
  yuki:app app quited +0ms
  yuki:app saving main window bounds -> { x: 175, y: 39, width: 1442, height: 634 } +33s
  yuki:config C:\Program Files M\YUKI\config\gui.json saved +2s
  yuki:config gui changed. reloading... +25ms
  yuki:config gui changed. reloading... +2ms
  yuki:config gui changed. reloading... +0ms

启用Mecab

  yuki:app __dirname: C:\Program Files M\YUKI\resources\app.asar\dist\electron +0ms
  yuki:app basePath: C:\Program Files M\YUKI +1ms
  yuki:app appPath: C:\Program Files M\YUKI\resources\app.asar +0ms
  yuki:app mainWinURL: file://C:\Program Files M\YUKI\resources\app.asar\dist\electron/index.html +1ms
  yuki:config C:\Program Files M\YUKI\config\config.json saved +0ms
  yuki:config C:\Program Files M\YUKI\config\config.json loaded with pre-save +0ms
  yuki:config C:\Program Files M\YUKI\config\games.json saved +3ms
  yuki:config C:\Program Files M\YUKI\config\games.json loaded with pre-save +0ms
  yuki:config C:\Program Files M\YUKI\config\texts.json saved +2ms
  yuki:config C:\Program Files M\YUKI\config\texts.json loaded with pre-save +0ms
  yuki:config C:\Program Files M\YUKI\config\gui.json saved +4ms
  yuki:config C:\Program Files M\YUKI\config\gui.json loaded with pre-save +0ms
  yuki:downloader:factory library base repo -> https://github.com/project-yuki/libraries/raw/master/_pack/ +0ms
  yuki:downloader:factory library base store path -> C:\Program Files M\YUKI\lib +0ms
  yuki:app creating window... +67ms
  yuki:ipc request config config +0ms
  yuki:ipc request config config +95ms
  yuki:ipc request config games +1ms
  yuki:ipc main page load finished. starting apis... +0ms
  yuki:api external file C:\Program Files M\YUKI\config\baiduApi.js loaded +0ms
  yuki:api external file C:\Program Files M\YUKI\config\youdaoApi.js loaded +1ms
  yuki:api external file C:\Program Files M\YUKI\config\azureApi.js loaded +2ms
  yuki:api external file C:\Program Files M\YUKI\config\qqApi.js loaded +2ms
  yuki:ipc apis started +7ms
  yuki:game choose Locale Emulator as locale changer +0ms
  yuki:game exec string: "C:\Program Files M\Locale Emulator\LEProc.exe" "E:\_galgame\GIGA\Aonatsu\Aonatsu.exe" +0ms
  yuki:game finding pid of Aonatsu.exe... +10ms
  yuki:game found game. pids [ 28704 ] +1s
  yuki:hooker trying to access CLI exe at C:\Program Files M\YUKI\lib\textractor\TextractorCLI.exe +0ms
  yuki:merger initialized true +0ms
  yuki:textInterceptor initialized +0ms
  yuki:textInterceptor initialized +0ms
  yuki:mecab enabled +0ms
  yuki:hooker application builded +144ms
  yuki:hooker injecting process 28704... +6ms
  yuki:hooker process 28704 injected +1ms
  yuki:win32 registering process exit callback at pid 28704... +0ms
  yuki:win32 process handle: 2900 +0ms
  yuki:win32 process exit callback registered +1ms
  yuki:translatorWindow alwaysOnTop -> true +0ms
  yuki:ipc request config config +8s
  yuki:translatorWindow subscribing hooker events... +522ms
  yuki:publish webContents YUKI Galgame Translator successfully subscribed type has-hook-text +0ms
  yuki:translatorWindow hooker events subscribed +1ms
  yuki:filter [0] $Textractor,undefined,|:,undefined,|pipeconnectedTextractor,undefined,|:,undefined,|h,undefined,|i,undefined,|jackingprocesslocatedfrom,undefined,|0,undefined,|x,undefined,|00400000,undefined,|to,undefined,|0,undefined,|x,undefined,|00,undefined,|F,undefined,|6,undefined,|E,undefined,|000,undefined,|Textractor,undefined,|:,undefined,|insertinghook,undefined,|:,undefined,|GetTextExtentPoint,undefined,|32,undefined,|ATextractor,undefined,|:,undefined,|insertinghook,undefined,|:,undefined,|G,undefined,|e,undefined,|t,undefined,|T,undefined,|e,undefined,|x,undefined,|tExtentExPointATextractor,undefined,|:,undefined,|insertinghook,undefined,|:,undefined,|G,undefined,|e,undefined,|t,undefined,|C,undefined,|h,undefined,|a,undefined,|r,undefined,|acterPlacementATextractor,undefined,|:,undefined,|insertinghook,undefined,|:,undefined,|G,undefined,|etGlyphIndicesATextractor,undefined,|:,undefined,|insertinghook,undefined,|:,undefined,|G,undefined,|etGlyphOutlineATextractor,undefined,|:,undefined,|insertinghook,undefined,|:,undefined,|ExtTextOutATextractor,undefined,|:,undefined,|insertinghook,undefined,|:,undefined,|TextOutA,undefined, +0ms
  yuki:filter [1] $C,undefined,|:,undefined,|ProgramFilesMYUKI,undefined, +2ms
  yuki:ipc request config config +77ms
  yuki:ipc request config { name: 'Aonatsu', code: '', path: 'E:\\_galgame\\GIGA\\Aonatsu\\Aonatsu.exe', localeChanger: 'localeEmulator' } +0ms
  yuki:ipc request config gui +2ms
  yuki:filter [0] $Textractor,undefined,|:,undefined,|insertinghook,undefined,|:,undefined,|G,undefined,|e,undefined,|tCharABCWidthsATextractor,undefined,|:,undefined,|insertinghook,undefined,|:,undefined,|G,undefined,|e,undefined,|t,undefined,|C,undefined,|h,undefined,|a,undefined,|r,undefined,|ABCWidthsFloatATextractor,undefined,|:,undefined,|insertinghook,undefined,|:,undefined,|GetCharWidth,undefined,|32,undefined,|ATextractor,undefined,|:,undefined,|insertinghook,undefined,|:,undefined,|G,undefined,|e,undefined,|t,undefined,|CharWidthFloatATextractor,undefined,|:,undefined,|insertinghook,undefined,|:,undefined,|GetTextExtentPoint,undefined,|32,undefined,|WTextractor,undefined,|:,undefined,|insertinghook,undefined,|:,undefined,|G,undefined,|e,undefined,|t,undefined,|T,undefined,|e,undefined,|x,undefined,|tExtentExPointWTextractor,undefined,|:,undefined,|insertinghook,undefined,|:,undefined,|GetCharacterPlacementW,undefined, +517ms
  yuki:filter [0] $Textractor,undefined,|:,undefined,|insertinghook,undefined,|:,undefined,|G,undefined,|etGlyphIndicesWTextractor,undefined,|:,undefined,|insertinghook,undefined,|:,undefined,|G,undefined,|etGlyphOutlineWTextractor,undefined,|:,undefined,|insertinghook,undefined,|:,undefined,|ExtTextOutWTextractor,undefined,|:,undefined,|insertinghook,undefined,|:,undefined,|TextOutWTextractor,undefined,|:,undefined,|insertinghook,undefined,|:,undefined,|G,undefined,|e,undefined,|tCharABCWidthsWTextractor,undefined,|:,undefined,|insertinghook,undefined,|:,undefined,|G,undefined,|e,undefined,|t,undefined,|C,undefined,|h,undefined,|a,undefined,|r,undefined,|ABCWidthsFloatWTextractor,undefined,|:,undefined,|insertinghook,undefined,|:,undefined,|GetCharWidth,undefined,|32,undefined,|WTextractor,undefined,|:,undefined,|insertinghook,undefined,|:,undefined,|GetCharWidthFloatW,undefined, +527ms
  yuki:filter [0] $Textractor,undefined,|:,undefined,|insertinghook,undefined,|:,undefined,|DrawTextATextractor,undefined,|:,undefined,|insertinghook,undefined,|:,undefined,|DrawTextExATextractor,undefined,|:,undefined,|insertinghook,undefined,|:,undefined,|TabbedTextOutATextractor,undefined,|:,undefined,|insertinghook,undefined,|:,undefined,|G,undefined,|e,undefined,|t,undefined,|T,undefined,|a,undefined,|bbedTextExtentATextractor,undefined,|:,undefined,|insertinghook,undefined,|:,undefined,|DrawTextWTextractor,undefined,|:,undefined,|insertinghook,undefined,|:,undefined,|DrawTextExWTextractor,undefined,|:,undefined,|insertinghook,undefined,|:,undefined,|TabbedTextOutWTextractor,undefined,|:,undefined,|insertinghook,undefined,|:,undefined,|GetTabbedTextExtentW,undefined, +551ms
  yuki:filter [0] $vnreng,undefined,|:,undefined,|INSERTNeXASTextractor,undefined,|:,undefined,|insertinghook,undefined,|:,undefined,|NeXAS,undefined, +3s
  yuki:filter [3] $<<,undefined,|�,undefined,|�,undefined,|�,undefined,|�,undefined,|�,undefined,|�,undefined,|�,undefined,|�,undefined,|�,undefined,|�,undefined,|�,undefined,|�>>,undefined,|�,undefined,|�,undefined,|ホ�,undefined,|��,undefined,�E|�,undefined,|�,undefined,|�,undefined,|�,undefined,|�,undefined,|�,undefined,|�,undefined,|�,undefined,|�,undefined,|��,undefined,|��,undefined,�P|�,undefined,|�,undefined,|�,undefined,|�ー,undefined,|�,undefined,|�,undefined,|�,undefined,�X�~��|��,undefined,�A�L��|��,undefined, +3s
  yuki:filter [4] $<<,undefined,|�,undefined,|�,undefined,|�,undefined,|�,undefined,|�,undefined,|�,undefined,|�,undefined,|�,undefined,|�,undefined,|�,undefined,|�,undefined,|�>>,undefined,|�,undefined,|�,undefined,|ホ�,undefined,|��,undefined,�E|�,undefined,|�,undefined,|�,undefined,|�,undefined,|�,undefined,|�,undefined,|�,undefined,|�,undefined,|�,undefined,|��,undefined,|��,undefined,�P|�,undefined,|�,undefined,|�,undefined,|�ー,undefined,|�,undefined,|�,undefined,|�,undefined,�X�~��|��,undefined,�A�L��|��,undefined, +2ms
  yuki:filter [2] $<<,undefined,|�,undefined,|�,undefined,|�,undefined,|�,undefined,|�,undefined,|�,undefined,|�,undefined,|�,undefined,|�,undefined,|�,undefined,|�,undefined,|�>>,undefined,|�,undefined,|�,undefined,|ホ�,undefined,|��,undefined,�E|�,undefined,|�,undefined,|�,undefined,|�,undefined,|�,undefined,|�,undefined,|�,undefined,|�,undefined,|�,undefined,|��,undefined,|��,undefined,�P|�,undefined,|�,undefined,|�,undefined,|�ー,undefined,|�,undefined,|�,undefined,|�,undefined,�X�~��|��,undefined,�A�L��|��,undefined, +3ms
  yuki:filter [4] $�,undefined,|��,undefined,|��,undefined,|ら�,undefined,|��,undefined,�f�B�[|�,undefined,|�,undefined,|�,undefined,|�,undefined,|く�,undefined,|��,undefined,�P�C|生�,undefined,|�,undefined,|��,undefined,|��,undefined,|�,undefined,|�,undefined,|�,undefined,|��,undefined,|��,undefined,�J��|わ�,undefined,|��,undefined,�W�F�C|�,undefined,|�通,undefined,|�,undefined,|�,undefined,|�,undefined,|�,undefined,|�,undefined,|��,undefined,|�,undefined,|��,undefined,�_�C|��,undefined,�f�B�[|か�,undefined,|��,undefined,|�,undefined,|�,undefined,|�,undefined,|�,undefined,|�,undefined,|�,undefined,|く�,undefined,|��,undefined,�P�C|�,undefined,|�1,undefined,|�,undefined,|�,undefined,|を�,undefined,|��,undefined,�I�~�N����|�,undefined,|�,undefined,|ド�,undefined,|��,undefined,�A�b�g|�,undefined,|�,undefined,|し�,undefined,|��,undefined, +2s
  yuki:filter [3] $�,undefined,|��,undefined,|��,undefined,|ら�,undefined,|��,undefined,�f�B�[|�,undefined,|�,undefined,|�,undefined,|�,undefined,|く�,undefined,|��,undefined,�P�C|生�,undefined,|�,undefined,|��,undefined,|��,undefined,|�,undefined,|�,undefined,|�,undefined,|��,undefined,|��,undefined,�J��|わ�,undefined,|��,undefined,�W�F�C|�,undefined,|�通,undefined,|�,undefined,|�,undefined,|�,undefined,|�,undefined,|�,undefined,|��,undefined,|�,undefined,|��,undefined,�_�C|��,undefined,�f�B�[|か�,undefined,|��,undefined,|�,undefined,|�,undefined,|�,undefined,|�,undefined,|�,undefined,|�,undefined,|く�,undefined,|��,undefined,�P�C|�,undefined,|�1,undefined,|�,undefined,|�,undefined,|を�,undefined,|��,undefined,�I�~�N����|�,undefined,|�,undefined,|ド�,undefined,|��,undefined,�A�b�g|�,undefined,|�,undefined,|し�,undefined,|��,undefined, +2ms
  yuki:filter [5] $�,undefined,|��,undefined,|��,undefined,|ら�,undefined,|��,undefined,�f�B�[|�,undefined,|�,undefined,|�,undefined,|�,undefined,|く�,undefined,|��,undefined,�P�C|生�,undefined,|�,undefined,|��,undefined,|��,undefined,|�,undefined,|�,undefined,|�,undefined,|��,undefined,|��,undefined,�J��|わ�,undefined,|��,undefined,�W�F�C|�,undefined,|�通,undefined,|�,undefined,|�,undefined,|�,undefined,|�,undefined,|�,undefined,|��,undefined,|�,undefined,|��,undefined,�_�C|��,undefined,�f�B�[|か�,undefined,|��,undefined,|�,undefined,|�,undefined,|�,undefined,|�,undefined,|�,undefined,|�,undefined,|く�,undefined,|��,undefined,�P�C|�,undefined,|�,undefined, +5ms
  yuki:filter [6] $1,undefined,|�,undefined,|�,undefined,|を�,undefined,|��,undefined,�I�~�N����|�,undefined,|�,undefined,|ド�,undefined,|��,undefined,�A�b�g|�,undefined,|�,undefined,|し�,undefined,|��,undefined, +434ms
  yuki:filter [3] $打�,undefined,|��,undefined,|�,undefined,|�,undefined,|変�,undefined,|��,undefined,�I�[|�,undefined,|�,undefined,|�,undefined,|�,undefined,|�,undefined,|�こ,undefined,|こ�,undefined,|��,undefined,|ら�,undefined,|��,undefined,|�,undefined,�J���W|��,undefined,|��,undefined,|�,undefined,|�,undefined,|�,undefined,|�,undefined,|上�,undefined,|��,undefined,�W�F�C|�,undefined,�}���V|��,undefined,|��,undefined,|こ�,undefined,|��,undefined,�p�[�Z���g|�,undefined,|�,undefined,|�,undefined,|�,undefined,|�,undefined,�N�W|��,undefined,�Z�K��|�,undefined,|��,undefined,�k�V|��,undefined,| が�,undefined,|�,undefined,|�し,undefined,|�,undefined,|��,undefined,|��,undefined,|�,undefined,|��,undefined,|��,undefined,|�,undefined,|�,undefined,|車�,undefined,|��,undefined,|�,undefined,|�,undefined,|す�,undefined,|��,undefined,�P�C| 気�,undefined,|��,undefined,�J��|�,undefined,|�,undefined,|�,undefined,|�,undefined,|�,undefined,���W�i|�,undefined,|か�,undefined,|��,undefined,|�,undefined,|�。,undefined, +668ms
  yuki:filter [4] $打�,undefined,|��,undefined,|�,undefined,|�,undefined,|変�,undefined,|��,undefined,�I�[|�,undefined,|�,undefined,|�,undefined,|�,undefined,|�,undefined,|�こ,undefined,|こ�,undefined,|��,undefined,|ら�,undefined,|��,undefined,|�,undefined,�J���W|��,undefined,|��,undefined,|�,undefined,|�,undefined,|�,undefined,|�,undefined,|上�,undefined,|��,undefined,�W�F�C|�,undefined,�}���V|��,undefined,|��,undefined,|こ�,undefined,|��,undefined,�p�[�Z���g|�,undefined,|�,undefined,|�,undefined,|�,undefined,|�,undefined,�N�W|��,undefined,�Z�K��|�,undefined,|��,undefined,�k�V|��,undefined,| が�,undefined,|�,undefined,|�し,undefined,|�,undefined,|��,undefined,|��,undefined,|�,undefined,|��,undefined,|��,undefined,|�,undefined,|�,undefined,|車�,undefined,|��,undefined,|�,undefined,|�,undefined,|す�,undefined,|��,undefined,�P�C| 気�,undefined,|��,undefined,�J��|�,undefined,|�,undefined,|�,undefined,|�,undefined,|�,undefined,���W�i|�,undefined,|か�,undefined,|��,undefined,|�,undefined,|�。,undefined, +5ms
  yuki:filter [7] $打�,undefined,|��,undefined,|�,undefined,|�,undefined,|変�,undefined,|��,undefined,�I�[|�,undefined,|�,undefined,|�,undefined,|�,undefined,|�,undefined,|�こ,undefined,|こ�,undefined,|��,undefined,|ら�,undefined,|��,undefined,|�,undefined,�J���W|��,undefined,|��,undefined,|�,undefined,|�,undefined,|�,undefined,|�,undefined,|上�,undefined,|��,undefined,�W�F�C|�,undefined,�}���V|��,undefined,|��,undefined,|こ�,undefined,|��,undefined,�p�[�Z���g|�,undefined,|�,undefined,|�,undefined,|�,undefined,|�,undefined,�N�W|��,undefined,�Z�K��|�,undefined,|��,undefined,�k�V|��,undefined,| が�,undefined,|�,undefined,|�し,undefined,|�,undefined,|��,undefined,|��,undefined,|�,undefined,|��,undefined,|��,undefined,|�,undefined,|�,undefined,|車�,undefined,|��,undefined,|�,undefined,|�,undefined,|す�,undefined,|��,undefined,�P�C| 気�,undefined,|��,undefined,�J��|�,undefined,|�,undefined,|�,undefined,|�,undefined,|�,undefined,���W�i|�,undefined,|か�,undefined,|��,undefined,|�,undefined,|�。,undefined, +3ms
  yuki:filter [7] $「�,undefined,|��,undefined,|れ�,undefined,|��,undefined,���E�r���o���S�E|さ�,undefined,|��,undefined,|�,undefined,�\�V|�,undefined,|夜�,undefined,|��,undefined,�r�[|�,undefined,|��,undefined,|��,undefined,�G��|か�,undefined,|��,undefined,�A�C|�,undefined,|��,undefined,|��,undefined,|た�,undefined,|��,undefined,�G�X|�,undefined,|��,undefined,|��,undefined,|�,undefined,|�,undefined,|�,undefined,|�,undefined,|�,undefined,|�,undefined,|」�,undefined,|��,undefined,|�,undefined,|�,undefined, +2s
  yuki:filter [4] $「�,undefined,|��,undefined,|れ�,undefined,|��,undefined,���E�r���o���S�E|さ�,undefined,|��,undefined,|�,undefined,�\�V|�,undefined,|夜�,undefined,|��,undefined,�r�[|�,undefined,|��,undefined,|��,undefined,�G��|か�,undefined,|��,undefined,�A�C|�,undefined,|��,undefined,|��,undefined,|た�,undefined,|��,undefined,�G�X|�,undefined,|��,undefined,|��,undefined,|�,undefined,|�,undefined,|�,undefined,|�,undefined,|�,undefined,|�,undefined,|」�,undefined,|��,undefined,|�,undefined,|�,undefined, +9ms
  yuki:filter [3] $「�,undefined,|��,undefined,|れ�,undefined,|��,undefined,���E�r���o���S�E|さ�,undefined,|��,undefined,|�,undefined,�\�V|�,undefined,|夜�,undefined,|��,undefined,�r�[|�,undefined,|��,undefined,|��,undefined,�G��|か�,undefined,|��,undefined,�A�C|�,undefined,|��,undefined,|��,undefined,|た�,undefined,|��,undefined,�G�X|�,undefined,|��,undefined,|��,undefined,|�,undefined,|�,undefined,|�,undefined,|�,undefined,|�,undefined,|�,undefined,|」�,undefined,|��,undefined,|�,undefined,|�,undefined, +2ms
  yuki:filter [8] $ +2s
  yuki:filter [9] $<,undefined,|HV,undefined,|1,undefined,|R,undefined, +1ms
  yuki:filter [10] $ +11ms
  yuki:filter [11] $�,undefined,|�,undefined,|�,undefined,|�,undefined,|�,undefined,|��,undefined,|��,undefined,�A�[��|�,undefined,|��,undefined,|�,undefined,|�し,undefined,|�,undefined,|�,undefined,|す�,undefined,|��,undefined,|?,undefined, +1ms
  yuki:filter [8] $ +1s
  yuki:filter [9] $<,undefined,|HV,undefined,|<,undefined,|HV,undefined, +3ms
  yuki:publish webContents YUKI Galgame Translator successfully unsubscribed type has-hook-text +19s
  yuki:translatorWindow saving translator window bounds -> { x: 2183, y: 267, width: 1364, height: 648 } +19s
  yuki:translatorWindow saving translator window alwaysOnTop -> true +1ms
  yuki:config C:\Program Files M\YUKI\config\gui.json saved +27s
  yuki:config gui changed. reloading... +31ms
  yuki:ipc reloading config gui +18s
  yuki:config gui changed. reloading... +3ms
  yuki:ipc reloading config gui +3ms
  yuki:config gui changed. reloading... +1ms
  yuki:ipc reloading config gui +1ms
  yuki:app app quited +0ms
  yuki:app saving main window bounds -> { x: 175, y: 39, width: 1442, height: 634 } +29s
  yuki:config C:\Program Files M\YUKI\config\gui.json saved +2s
  yuki:config gui changed. reloading... +28ms
  yuki:config gui changed. reloading... +1ms
  yuki:config gui changed. reloading... +1ms
tinyAdapter commented 4 years ago

确实没看出来有啥问题……因为以前从来没遇到过这种情况,也没其他人遇到过……

我去搞个アオナツライン看看吧,初步怀疑可能跟游戏使用的编码有关

lgztx96 commented 4 years ago

神奇,不过我这是正常的,游戏1.04,yuki0.14,win10 1903 1

tinyAdapter commented 4 years ago

搞到了,这游戏真神秘……开头一段黑屏我没带耳机还以为出BUG了……

我这边完全没有问题,Mecab启用也能正常获取文本,你要不试试Mecab路径、游戏路径和YUKI路径中不要出现非英文字符和空格看看?(因为我看你的路径中有空格)

Aonatsu_2020-02-06-13 54 43 445 Aonatsu_2020-02-06-13 54 50 892

arition commented 4 years ago

我换了笔记本,试了一下确实就可以用了,很迷

arition commented 4 years ago

刚刚尝试直接从源码Debug

https://github.com/project-yuki/YUKI/blob/ce74031087e2514a75249fce32a0f6841bcd8791/src/main/middlewares/MeCabMiddleware.ts#L118

这里的context.text还是正常的,拿到的results就是乱码了

https://github.com/project-yuki/YUKI/blob/ce74031087e2514a75249fce32a0f6841bcd8791/src/main/middlewares/MeCabMiddleware.ts#L127

然后在这里用mecab的结果重新组成了句子,所以抓的文字也乱码了。

所以看起来是mecab的编码交互有问题,我明天有空再看一看。

pauxavi commented 4 years ago

我在使用YUKI的时候也遇到了同样的问题。 此外还有一个问题:取词器读取的字符串,不是ABCDEFG……而是AABBCCDD……或者AAABBBCCCDDD……这样的字符串,在线翻译工具有时能对付,又是对付不了,翻译的结果不好。 在使用VNR的时候,VNR有处理这种重叠字符串的选项。可以增加对字符串的处理功能吗?

pauxavi commented 4 years ago

对了,取词器取词重叠这个问题,有些游戏有,有些游戏没有。

yuanweiz commented 4 years ago

我之前也遇到了同样的问题,虽然现在没有root cause,在此先附上自己的观察: 游戏:クロノクロック 系统:win10 1909, locale 中文,minori v0.14

  1. 使用本项目链接里的mecab,出现乱码,显示为replacement special �
  2. 用sourceforge下载的mecab 0.996,安装时指定编译为Shift-JIS/EUC-JP出现乱码
  3. 用mecab 0.996,选择编译charset为UTF-8,显示正常。

我还没有看yuki/mecab的代码,我的猜测是mecab默认的行为是输出EUC?尽管这不能说明为什么其他用户的机器上不能复现这个问题。

binary是在这个主页上下载的 https://taku910.github.io/mecab/

mecab-0.996.zip

pauxavi commented 4 years ago

我之前也遇到了同样的问题,虽然现在没有root cause,在此先附上自己的观察: 游戏:クロノクロック 系统:win10 1909, locale 中文,minori v0.14

  1. 使用本项目链接里的mecab,出现乱码,显示为replacement special �
  2. 用sourceforge下载的mecab 0.996,安装时指定编译为Shift-JIS/EUC-JP出现乱码
  3. 用mecab 0.996,选择编译charset为UTF-8,显示正常。

我还没有看yuki/mecab的代码,我的猜测是mecab默认的行为是输出EUC?尽管这不能说明为什么其他用户的机器上不能复现这个问题。

binary是在这个主页上下载的 https://taku910.github.io/mecab/

mecab-0.996.zip

感谢!按照说明的选项重装了mecab(选择编译charset为UTF-8),显示正常。

luojunyuan commented 4 years ago

我在使用YUKI的时候也遇到了同样的问题。 此外还有一个问题:取词器读取的字符串,不是ABCDEFG……而是AABBCCDD……或者AAABBBCCCDDD……这样的字符串,在线翻译工具有时能对付,又是对付不了,翻译的结果不好。 在使用VNR的时候,VNR有处理这种重叠字符串的选项。可以增加对字符串的处理功能吗?

关于文本重复请打开text.json的deduplicate