// Generate all Unicode characters, including extended characters.
try {
var hMainWnd=AkelPad.GetMainWnd();
}
catch (oError) {
WScript.Quit();
}
var oSys =AkelPad.SystemFunction();
var nAkelEdit=AkelPad.IsAkelEdit();
var hWndEdit =AkelPad.GetEditWnd();
SetRedraw(hWndEdit, false);
var vChar=[];
for (i=0x0000;i<=0x0FFF;i+=1) {
x=i.toString(16);
vChar.push(unescape("\%u" + "000".substr(0, 4-x.length)+x));
}
for (i=0x1000;i<=0xD7FF;i+=1) {
vChar.push(unescape("\%u" + i.toString(16)));
}
for (i=0xE000;i<=0xFFFF;i+=1) {
vChar.push(unescape("\%u" + i.toString(16)));
}
x=null;
i=null;
CollectGarbage();
// Generate extended characters.
for (i=0xd800;i<=0xDBFF;i+=1) {
x=i.toString(16);
for (j=0xDC00;j<=0xDFFF;j+=1) {
vChar.push(unescape("%u" + x + "%u" + j.toString(16)));
}
}
x=null;
i=null;
j=null;
SetRedraw(hWndEdit, true);
AkelPad.ReplaceSel(vChar.join("\n"));
vChar=null;
CollectGarbage();
function SetRedraw(hWnd, bRedraw) {
if (nAkelEdit) {
AkelPad.SendMessage(hWnd, 3185 /*AEM_LOCKSCROLL*/, 3 /*SB_BOTH*/, !bRedraw);
}
AkelPad.SendMessage(hWnd, 11 /*WM_SETREDRAW*/, bRedraw, 0);
if (bRedraw) {
oSys.Call("user32::InvalidateRect", hWnd, 0, true);
}
}
.
Save that into file in ULE codepage.
Then Find "?" without any checkbox. there only one "?" exist. It's OK.
Save as the file in codepage GB18030(54936), then Find "?" again, still OK?
Yes, it seem OK.
Then reopen the file and Find "?" again, you will find that there is 42 general chars and 1024 surrogate pair chars become dirty.
The same save action in BabelPad 6.2.0.3 is OK.
Another bug, I had set the default codepage from GBK(936) to GB18030(54936), and had restarted AkelPad. But when I open a ANSI file autodect, AkelPad open it in GBK(936), even I deleted GBK(936) from filter list.
_____________
AkelPad 4.8.0+
WinXP SP3 ChineseSimplified
Posted: Sat Jan 19, 2013 3:16 pm
by Instructor
cnnnc wrote:It seems that I found a bug about save file from ULE(Unicode_LE) to GB18030(54936).
Another bug, I had set the default codepage from GBK(936) to GB18030(54936), and had restarted AkelPad. But when I open a ANSI file autodect, AkelPad open it in GBK(936), even I deleted GBK(936) from filter list.
Autodetection proceeds with hardcoded codepages you cannot change them.
Posted: Thu Jan 24, 2013 4:47 am
by cnnnc
Instructor wrote:
cnnnc wrote:It seems that I found a bug about save file from ULE(Unicode_LE) to GB18030(54936).
Test version
Yes, the bug is fixed. Thanks!
Posted: Sat Feb 02, 2013 9:13 am
by cnnnc
It seems there still a bug about save file from ULE(Unicode_LE) to GB18030(54936).
In order to get the text to test, please run UnicodeCharGen.js but a little change the:
Save that into file in ULE codepage.
Then Find "?" without any checkbox. there only one "?" exist. It's OK.
Save as the file in codepage GB18030(54936), then Find "?" again, still OK?
Yes, it seem OK.
Then reopen the file and Find "?" again, you will find that there is 512 surrogate pair chars become dirty. They look rules:
There not only these surrogate pair chars become dirty, some others generated in some other actual cases, but they are not look rules.
_____________
AkelPad 4.8.1+
WinXP SP3 ChineseSimplified