fix bug that WinFF fail to encode in Windows CJK environment #235
fix bug that WinFF fail to encode in Windows CJK environment #235PeterBBBBB merged 4 commits intoWinFF:masterfrom
Conversation
…ly other locales too, since utf-8 codepage is used)
|
The main problem is that TStringList.saveToFile() will create UTF-8 file. But WinFF's old logic will try to call UTF8ToConsole to convert the BAT file content to console encoding (might be latin1). Wrong encoding of BAT file will prevent ffmpeg from running. The patch will use utf-8 codepage if you enable CHCP option. Thus WiFF will be able to encode media file(s) with filename that contains non-ascii character. Tested in Lazarus 1.8.0, Win7SP1 x64, Simplified Chinese. --- the following is Chinese version of above --- 请在 偏好设置里面的 MS Windows 分页里面勾选“使用CHCP来处理国际字符”。启用了CHCP后,WinFF 已在 Win7SP1 x64 简体中文环境下测试通过(使用 lazarus-1.8.0 编译)。 |
|
@daxiaoming awesome that you provide a solution for an extremely long standing issue (Issue #51) However, I am not a user on Windows, so I can't verify and I would love other people to confirm that with this patch implemented, stuff works. |
|
@paulgevers please do verify thoroughly before accepting this PR, as I only have simplified Chinese environment. |
fix bug that WinFF fail to encode in Windows CJK environment (probably other locales too, since utf-8 codepage is used)