The encoding error occur in ansi version
dmacoder opened this issue · 3 comments
ahk source code (examtranslate.ahk)
tip=
(
이 번역기는 완벽한 번역기가 아닙니다.
Hello?
안녕하세요
(TODO: 다른 팁도 추가하기)
)
gosub,Tray_Init
msgbox,% tip
exitapp
Tray_Init:
Menu, Tray, NoStandard
Menu, Tray, DeleteAll
Menu, tray, add, 사이트 방문 , 사이트방문
return
사이트방문:
run, IEXPLORE.EXE "http://translate.google.com"
return
This ahk script occurs encoding error when it was compiled using ansi version.
I modify GetLine functions in existing C++ code (in script.cpp)
and compiled AutoHotkeySC.bin.
and then it works.
But, a compiled script(likes over 10000 lines of script) is very slow to launch. Performance is very slow.
Can you do fix it?
cpp source code (script.cpp)
size_t Script::GetLine(LPTSTR aBuf, int aMaxCharsToRead, int aInContinuationSection, TextStream *ts)
{
....
...
..
.
ifdef _UNICODE
//aBuf_length = UTF8ToUTF16((unsigned char*)aBuf, aMaxCharsToRead, (unsigned char*)aDataBuf, aSizeEncrypted) - 1;
aBuf_length = MultiByteToWideChar(CP_UTF8, 0, (LPCSTR)aDataBuf, -1, aBuf, aMaxCharsToRead) - 1;
else
//_tcscpy(aBuf, (LPTSTR)aDataBuf);
//replace below 3 lines
CStringA sChar;
StringUTF8ToChar((LPCSTR)aDataBuf, sChar, -1, NULL, CP_ACP);
_tcscpy(aBuf, sChar);
aBuf_length = _tcslen(aBuf);
....
...
..
.
}
That should be fixed now ;)
Now Compiling and Running is ok.
But the encoding errors still occur as follow
https://s8.postimg.org/ae109ghlh/encoding_error.jpg
test.exe
? ???? ??? ???? ????.
Hello?
?????(TODO: ?? ?? ????)
확인
It should be as follows
test.ahk
이 번역기는 완벽한 번역기가 아닙니다.
Hello?
안녕하세요(TODO: 다른 팁도 추가하기)
확인
Could you compile this ahk source code (test.ahk)?
This ahk script occurs encoding error when it was compiled using ansi version.
test.ahk
tip=
(
이 번역기는 완벽한 번역기가 아닙니다.
Hello?
안녕하세요
(TODO: 다른 팁도 추가하기)
)
gosub,Tray_Init
msgbox,% tip
exitapp
Tray_Init:
Menu, Tray, NoStandard
Menu, Tray, DeleteAll
Menu, tray, add, 사이트 방문 , 사이트방문
return
사이트방문:
run, IEXPLORE.EXE "http://translate.google.com"
return
Is this still an issue, can you please double check