| |
h-tomさん、ありがとうございます。
>そこの13区は、NEC機種依存文字で、文字コードが重複していたり、色々面倒です。
>"[-∩]"の文字コードをみると、[0x878d-0x81bf] に見えます。
>正確に、その範囲を指定したいなら、文字コードで指定すればいいのでは?
∩は0x81BEもありますが範囲からいうと香i0x878D)より大きいはずなので、
この∩はshift-JIS 文字コード表(http://charset.7jp.net/sjis.html)によると 0
x879B のようです。
ただ、文字コードで範囲指定するマクロのコーディング方法を知らないので下記マク
ロでは全部×になってしまいました。
正しい方法をご教示くださる助かります。[0x878D-0x879B] を [\x878D-\x879B]に
してもうまくいきません。
よろしくご教授ください。
//サンプル マクロ//////////////////////////////////////
//shift-JIS 文字コード表の並び: 香@氏@潤@≒ ≡ ∫ 刀@煤@√ ⊥ ∠
凵@∵ ∩ ∪
loaddll "hmjre.dll";
$$str = "abcdあ";
##pos = dllfunc("FindRegular", "[x878D-x879B]", $$str, 0);//[-∩] コード
表によると∩は0x879Bのようです。
question "@ ×\n##pos = " + str(##pos) + "\n文字 = " + midstr($$str, ##pos,
dllfunc("GetLastMatchLength"));
if(!result) endmacro;
##pos = dllfunc("FindRegular", "[0x878F-0x81E0]", $$str, 0);//[-≒]
question "A ×\n##pos = " + str(##pos) + "\n文字 = " + midstr($$str, ##pos,
dllfunc("GetLastMatchLength"));
if(!result) endmacro;
##pos = dllfunc("FindRegular", "[0x878F-0x878F]", $$str, 0);//[-従
question "B ×\n##pos = " + str(##pos) + "\n文字 = " + midstr($$str, ##pos,
dllfunc("GetLastMatchLength"));
if(!result) endmacro;
##pos = dllfunc("FindRegular", "[0x81E0-0x81E0]", $$str, 0);//[≒-≒]
question "C ×\n##pos = " + str(##pos) + "\n文字 = " + midstr($$str, ##pos,
dllfunc("GetLastMatchLength"));
if(!result) endmacro;
##pos = dllfunc("FindRegular", "[0x82A0-0x82A0]", $$str, 0);//[あ-あ]
question "D ×\n##pos = " + str(##pos) + "\n文字 = " + midstr($$str, ##pos,
dllfunc("GetLastMatchLength"));
if(!result) endmacro;
##pos = dllfunc("FindRegular", "[0x61-0x62]", $$str, 0);//[a-b]
question "E ×\n##pos = " + str(##pos) + "\n文字 = " + midstr($$str, ##pos,
dllfunc("GetLastMatchLength"));
if(!result) endmacro;
endmacro;
//サンプル マクロ 終わり//////////////////////////////////////
|
|