📄 charset.java
字号:
//4 bits main triple + 3 bits character_set
private final static int G0_set_mapping[][] = {
{ 0, 0, 0, 0, 0, 0, 0, 0 }, //0, latin
{ 0, 0, 0, 0, 0, 0, 0, 0 }, //1, latin
{ 0, 0, 0, 0, 0, 0, 0, 0 }, //2, latin
{ 0, 0, 0, 0, 0, 0, 0, 0 }, //3, latin
{ 1, 2, 0, 0, 0, 3, 0, 0 }, //4, cy-1,cy-2,la,la,la,cy-3,la,la
{ 0, 0, 0, 0, 0, 0, 0, 0 }, //5, all res.
{ 0, 0, 0, 0, 0, 0, 0, 4 }, //6, res,res,res,la,res,res,res,gre
{ 0, 0, 0, 0, 0, 0, 0, 0 }, //7, all res.
{ 0, 0, 0, 0, 0, 0, 0, 5 }, //8, la,la,res,res,res,res,res,ara
{ 0, 0, 0, 0, 0, 0, 0, 0 }, //9, all res.
{ 0, 0, 0, 0, 0, 6, 0, 5 }, //10, res,res,res,res,res,heb,res,ara
{ 0, 0, 0, 0, 0, 0, 0, 0 }, //11, all res.
{ 0, 0, 0, 0, 0, 0, 0, 0 }, //12, all res.
{ 0, 0, 0, 0, 0, 0, 0, 0 }, //13, all res.
{ 0, 0, 0, 0, 0, 0, 0, 0 }, //14, all res.
{ 0, 0, 0, 0, 0, 0, 0, 0 }, //15, all res.
};
//4 bits main triple + 3 bits character_set
private final static int G2_set_mapping[][] = {
{ 0, 0, 0, 0, 0, 0, 0, 0 }, //0, latin
{ 0, 0, 0, 0, 0, 0, 0, 0 }, //1, latin
{ 0, 0, 0, 0, 0, 0, 0, 0 }, //2, latin
{ 0, 0, 0, 0, 0, 0, 0, 0 }, //3, latin
{ 1, 1, 0, 0, 0, 1, 0, 0 }, //4, cy,cy,la,la,la,cy,la,res
{ 0, 0, 0, 0, 0, 0, 0, 0 }, //5, all res.
{ 0, 0, 0, 0, 0, 0, 0, 2 }, //6, res,res,res,la,res,res,res,gre
{ 0, 0, 0, 0, 0, 0, 0, 0 }, //7, all res.
{ 3, 3, 0, 0, 0, 0, 0, 3 }, //8, ara,ara,res,res,res,res,res,ara
{ 0, 0, 0, 0, 0, 0, 0, 0 }, //9, all res.
{ 0, 0, 0, 0, 0, 3, 0, 3 }, //10, res,res,res,res,res,ara,res,ara
{ 0, 0, 0, 0, 0, 0, 0, 0 }, //11, all res.
{ 0, 0, 0, 0, 0, 0, 0, 0 }, //12, all res.
{ 0, 0, 0, 0, 0, 0, 0, 0 }, //13, all res.
{ 0, 0, 0, 0, 0, 0, 0, 0 }, //14, all res.
{ 0, 0, 0, 0, 0, 0, 0, 0 }, //15, all res.
};
//DM10082004 081.7 int08 changed
//4 bits main tripl + 3 bits character_set
private final static int national_subset_mapping[][] = {
{ 0, 1, 2, 3, 4, 5, 6, 7 }, //0, en,fr,se,cz,de,es,it,ro
{ 9, 1, 2, 3, 4, 5, 6, 7 }, //1, pl,fr,se,cz,de,es,it,ro
{ 0, 1, 2, 12, 4, 5, 6, 7 }, //2, en,fr,se,tr,de,es,it,ro
{ 13, 13, 13, 13, 13, 10, 13, 7 }, //3, en,fr,se,cz,de,cr,it,ro
{ 13, 13, 11, 3, 4, 13, 8, 13 }, //4, et,cz,de,cr
{ 13, 13, 13, 13, 13, 13, 13, 13 }, //5, res!
{ 13, 13, 13, 12, 13, 13, 13, 13 }, //6, res,res,res,tr,res,res,res,(gr)
{ 13, 13, 13, 13, 13, 13, 13, 13 }, //7, res!
{ 0, 1, 13, 13, 13, 13, 13, 13 }, //8, en,fr,res,res,res,res,res,(ar)
{ 13, 13, 13, 13, 13, 13, 13, 13 }, //9, res!
{ 13, 13, 13, 13, 13, 13, 13, 13 }, //10, res,res,res,res,res,(he),res,(ar)
{ 13, 13, 13, 13, 13, 13, 13, 13 }, //11, res!
{ 13, 13, 13, 13, 13, 13, 13, 13 }, //12, res!
{ 13, 13, 13, 13, 13, 13, 13, 13 }, //13, res!
{ 13, 13, 13, 13, 13, 13, 13, 13 }, //14, res!
{ 13, 13, 13, 13, 13, 13, 13, 13 }, //15, res!
};
//DM10082004 081.7 int08 changed
//A=65 .. Z=90
private final static short diacritical_uppercase_char_map[][] = {
{ 0, 192, 193, 194, 195, 256, 258, 0, 196, 0, 197, 0, 0, 0, 260, 258 }, //A
{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, //B
{ 0, 0, 262, 264, 0, 0, 268, 266, 0, 0, 0, 199, 0, 0, 0, 268 }, //C
{ 0, 0, 0, 0, 0, 0, 270, 0, 0, 0, 0, 0, 0, 0, 0, 270 }, //D
{ 0, 200, 201, 202, 0, 274, 276, 278, 203, 0, 0, 0, 0, 0, 280, 282 }, //E
{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, //F
{ 0, 0, 0, 284, 0, 0, 286, 288, 0, 0, 0, 290, 0, 0, 0, 0 }, //G
{ 0, 0, 0, 292, 0, 294, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, //H
{ 0, 204, 205, 206, 296, 298, 300, 304, 207, 0, 0, 0, 0, 0, 302, 300 }, //I
{ 0, 0, 0, 308, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, //J
{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 310, 0, 0, 0, 0 }, //K
{ 0, 0, 313, 0, 0, 0, 0, 319, 0, 0, 0, 315, 0, 0, 0, 317 }, //L
{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, //M
{ 0, 0, 323, 0, 209, 0, 0, 0, 0, 0, 0, 325, 0, 0, 0, 327 }, //N
{ 0, 210, 211, 212, 213, 332, 334, 0, 214, 0, 0, 0, 0, 336, 0, 334 }, //O
{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, //P
{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, //Q
{ 0, 0, 340, 0, 0, 0, 0, 0, 0, 0, 0, 342, 0, 0, 0, 344 }, //R
{ 0, 0, 346, 348, 0, 0, 0, 0, 0, 0, 0, 350, 0, 0, 0, 352 }, //S
{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 354, 0, 0, 0, 356 }, //T
{ 0, 217, 218, 219, 360, 362, 364, 0, 220, 0, 366, 0, 0, 368, 370, 364 }, //U
{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, //V
{ 0, 0, 0, 372, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, //W
{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, //X
{ 0, 0, 221, 374, 0, 0, 0, 0, 376, 0, 0, 0, 0, 0, 0, 0 }, //Y
{ 0, 0, 377, 0, 0, 0, 0, 379, 0, 0, 0, 0, 0, 0, 0, 381 }, //Z
};
//DM10082004 081.7 int08 changed
//a=97 .. z=122
private final static short diacritical_lowercase_char_map[][] = {
{ 0, 224, 225, 226, 227, 257, 259, 0, 228, 0, 229, 0, 0, 0, 261, 259 }, //a
{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, //b
{ 0, 0, 263, 265, 0, 0, 269, 267, 0, 0, 0, 231, 0, 0, 0, 269 }, //c
{ 0, 0, 0, 0, 0, 0, 271, 0, 0, 0, 0, 0, 0, 0, 0, 271 }, //d
{ 0, 232, 233, 234, 0, 275, 277, 279, 235, 0, 0, 0, 0, 0, 281, 283 }, //e
{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, //f
{ 0, 0, 0, 285, 0, 0, 287, 289, 0, 0, 0, 291, 0, 0, 0, 0 }, //g
{ 0, 0, 0, 293, 0, 295, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, //h
{ 0, 236, 237, 238, 297, 299, 301, 305, 239, 0, 0, 0, 0, 0, 303, 301 }, //i
{ 0, 0, 0, 309, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, //j
{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 311, 0, 0, 0, 0 }, //k
{ 0, 0, 314, 0, 0, 0, 0, 320, 0, 0, 0, 316, 0, 0, 0, 318 }, //l
{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, //m
{ 0, 0, 324, 0, 241, 0, 0, 0, 0, 0, 0, 326, 0, 0, 0, 328 }, //n
{ 0, 242, 243, 244, 245, 333, 335, 0, 246, 0, 0, 0, 0, 337, 0, 335 }, //o
{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, //p
{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, //q
{ 0, 0, 341, 0, 0, 0, 0, 0, 0, 0, 0, 343, 0, 0, 0, 345 }, //r
{ 0, 0, 347, 349, 0, 0, 0, 0, 0, 0, 0, 351, 0, 0, 0, 353 }, //s
{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 355, 0, 0, 0, 357 }, //t
{ 0, 249, 250, 251, 361, 363, 365, 0, 252, 0, 367, 0, 0, 369, 371, 365 }, //u
{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, //v
{ 0, 0, 0, 373, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, //w
{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, //x
{ 0, 0, 253, 375, 0, 0, 0, 0, 255, 0, 0, 0, 0, 0, 0, 0 }, //y
{ 0, 0, 378, 0, 0, 0, 0, 380, 0, 0, 0, 0, 0, 0, 0, 382 }, //z
};
public static short[] getActive_G0_Set(int mapping, int character_set, int row)
{
if (row < 26)
return G0_sets[G0_set_mapping[mapping][character_set]];
else
return G0_sets[G0_set_mapping[0][0]];
}
public static short[] getActive_G2_Set(int mapping, int character_set, int row)
{
if (row < 26)
return G2_sets[G2_set_mapping[mapping][character_set]];
else
return G2_sets[G2_set_mapping[0][0]];
}
public static short[] getActiveNationalSubset(int mapping, int character_set, int row)
{
if (row < 26)
return national_subsets[national_subset_mapping[mapping][character_set]];
else
return national_subsets[national_subset_mapping[0][0]];
}
public static short getCombinedCharacter(int basic_char, int combine_char)
{
short val = 0;
if (basic_char >= 65 && basic_char <= 90)
val = diacritical_uppercase_char_map[basic_char - 65][combine_char];
else if (basic_char >= 97 && basic_char <= 122)
val = diacritical_lowercase_char_map[basic_char - 97][combine_char];
if (val == 0)
return (short)basic_char;
else
return val;
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -