JNIEXPORT jint JNICALL Java_org_apache_harmony_niochar_charset_ISO_18859_113_00024Decoder_nDecode (JNIEnv *env, jobject obj, jcharArray outArr, jint arrPosition, jint remaining, jlong inAddr, jint absolutePos) { unsigned int table[] = { 0x201D,0x00A2,0x00A3,0x00A4,0x201E,0x00A6,0x00A7, 0x00D8,0x00A9,0x0156,0x00AB,0x00AC,0x00AD,0x00AE,0x00C6, 0x00B0,0x00B1,0x00B2,0x00B3,0x201C,0x00B5,0x00B6,0x00B7, 0x00F8,0x00B9,0x0157,0x00BB,0x00BC,0x00BD,0x00BE,0x00E6, 0x0104,0x012E,0x0100,0x0106,0x00C4,0x00C5,0x0118,0x0112, 0x010C,0x00C9,0x0179,0x0116,0x0122,0x0136,0x012A,0x013B, 0x0160,0x0143,0x0145,0x00D3,0x014C,0x00D5,0x00D6,0x00D7, 0x0172,0x0141,0x015A,0x016A,0x00DC,0x017B,0x017D,0x00DF, 0x0105,0x012F,0x0101,0x0107,0x00E4,0x00E5,0x0119,0x0113, 0x010D,0x00E9,0x017A,0x0117,0x0123,0x0137,0x012B,0x013C, 0x0161,0x0144,0x0146,0x00F3,0x014D,0x00F5,0x00F6,0x00F7, 0x0173,0x0142,0x015B,0x016B,0x00FC,0x017C,0x017E,0x2019 }; jchar *out = (*env)->GetCharArrayElements(env, outArr, NULL); jint position = absolutePos; int i; unsigned char input; for(i=0; i < remaining; i++) { input = *(jlong2addr(jbyte, inAddr) + position++); if(input < 0xA1) { out[arrPosition+i] = (jchar)input; }else{ out[arrPosition+i] = (jchar)table[input - 161]; } } (*env)->ReleaseCharArrayElements(env, outArr, out, 0); return position-absolutePos; }
JNIEXPORT jint JNICALL Java_org_apache_harmony_niochar_charset_additional_x_1IBM1006_00024Decoder_nDecode (JNIEnv *env, jobject obj, jcharArray outArr, jint arrPosition, jint remaining, jlong inAddr, jint absolutePos) { unsigned int table[] = { 0x06F0,0x06F1,0x06F2,0x06F3,0x06F4,0x06F5,0x06F6, 0x06F7,0x06F8,0x06F9,0x060C,0x061B,0x00AD,0x061F,0xFE81, 0xFE8D,0xFE8E,0xF8FB,0xFE8F,0xFE91,0xFB56,0xFB58,0xFE93, 0xFE95,0xFE97,0xFB66,0xFB68,0xFE99,0xFE9B,0xFE9D,0xFE9F, 0xFB7A,0xFB7C,0xFEA1,0xFEA3,0xFEA5,0xFEA7,0xFEA9,0xFB88, 0xFEAB,0xFEAD,0xFB8C,0xFEAF,0xFB8A,0xFEB1,0xFEB3,0xFEB5, 0xFEB7,0xFEB9,0xFEBB,0xFEBD,0xFEBF,0xFEC3,0xFEC7,0xFEC9, 0xFECA,0xFECB,0xFECC,0xFECD,0xFECE,0xFECF,0xFED0,0xFED1, 0xFED3,0xFED5,0xFED7,0xFB8E,0xFEDB,0xFB92,0xFB94,0xFEDD, 0xFEDF,0xFEE0,0xFEE1,0xFEE3,0xFB9E,0xFEE5,0xFEE7,0xFE85, 0xFEED,0xFBA6,0xFBA8,0xFBA9,0xFBAA,0xFE80,0xFE89,0xFE8A, 0xFE8B,0xFBFC,0xFBFD,0xFBFE,0xFBB0,0xFBAE,0xFE7C,0xFE7D }; jchar *out = (*env)->GetCharArrayElements(env, outArr, NULL); jint position = absolutePos; int i; unsigned char input; for(i=0; i < remaining; i++) { input = *(jlong2addr(jbyte, inAddr) + position++); if(input < 0xA1) { out[arrPosition+i] = (jchar)input; }else{ out[arrPosition+i] = (jchar)table[input - 161]; } } (*env)->ReleaseCharArrayElements(env, outArr, out, 0); return position-absolutePos; }
JNIEXPORT jint JNICALL Java_org_apache_harmony_niochar_charset_additional_IBM424_00024Decoder_nDecode (JNIEnv *env, jobject obj, jcharArray outArr, jint arrPosition, jint remaining, jlong inAddr, jint absolutePos) { unsigned int table[] = { 0x009C,0x0009,0x0086,0x007F, 0x0097,0x008D,0x008E,0x000B,0x000C,0x000D,0x000E,0x000F, 0x0010,0x0011,0x0012,0x0013,0x009D,0x0085,0x0008,0x0087, 0x0018,0x0019,0x0092,0x008F,0x001C,0x001D,0x001E,0x001F, 0x0080,0x0081,0x0082,0x0083,0x0084,0x000A,0x0017,0x001B, 0x0088,0x0089,0x008A,0x008B,0x008C,0x0005,0x0006,0x0007, 0x0090,0x0091,0x0016,0x0093,0x0094,0x0095,0x0096,0x0004, 0x0098,0x0099,0x009A,0x009B,0x0014,0x0015,0x009E,0x001A, 0x0020,0x05D0,0x05D1,0x05D2,0x05D3,0x05D4,0x05D5,0x05D6, 0x05D7,0x05D8,0x00A2,0x002E,0x003C,0x0028,0x002B,0x007C, 0x0026,0x05D9,0x05DA,0x05DB,0x05DC,0x05DD,0x05DE,0x05DF, 0x05E0,0x05E1,0x0021,0x0024,0x002A,0x0029,0x003B,0x00AC, 0x002D,0x002F,0x05E2,0x05E3,0x05E4,0x05E5,0x05E6,0x05E7, 0x05E8,0x05E9,0x00A6,0x002C,0x0025,0x005F,0x003E,0x003F, 0x0000,0x05EA,0x0000,0x0000,0x00A0,0x0000,0x0000,0x0000, 0x2017,0x0060,0x003A,0x0023,0x0040,0x0027,0x003D,0x0022, 0x0000,0x0061,0x0062,0x0063,0x0064,0x0065,0x0066,0x0067, 0x0068,0x0069,0x00AB,0x00BB,0x0000,0x0000,0x0000,0x00B1, 0x00B0,0x006A,0x006B,0x006C,0x006D,0x006E,0x006F,0x0070, 0x0071,0x0072,0x0000,0x0000,0x0000,0x00B8,0x0000,0x00A4, 0x00B5,0x007E,0x0073,0x0074,0x0075,0x0076,0x0077,0x0078, 0x0079,0x007A,0x0000,0x0000,0x0000,0x0000,0x0000,0x00AE, 0x005E,0x00A3,0x00A5,0x2022,0x00A9,0x00A7,0x00B6,0x00BC, 0x00BD,0x00BE,0x005B,0x005D,0x203E,0x00A8,0x00B4,0x00D7, 0x007B,0x0041,0x0042,0x0043,0x0044,0x0045,0x0046,0x0047, 0x0048,0x0049,0x00AD,0x0000,0x0000,0x0000,0x0000,0x0000, 0x007D,0x004A,0x004B,0x004C,0x004D,0x004E,0x004F,0x0050, 0x0051,0x0052,0x00B9,0x0000,0x0000,0x0000,0x0000,0x0000, 0x005C,0x00F7,0x0053,0x0054,0x0055,0x0056,0x0057,0x0058, 0x0059,0x005A,0x00B2,0x0000,0x0000,0x0000,0x0000,0x0000, 0x0030,0x0031,0x0032,0x0033,0x0034,0x0035,0x0036,0x0037, 0x0038,0x0039,0x00B3,0x0000,0x0000,0x0000,0x0000,0x009F }; jchar *out = (*env)->GetCharArrayElements(env, outArr, NULL); jint position = absolutePos; int i; unsigned char input; for(i=0; i < remaining; i++) { input = *(jlong2addr(jbyte, inAddr) + position++); if(input < 0x04) { out[arrPosition+i] = (jchar)input; }else{ if(table[input - 4] != 0){ out[arrPosition+i] = (jchar)table[input - 4]; }else{ (*env)->ReleaseCharArrayElements(env, outArr, out, 0); return - (position-1 - absolutePos) ; } } } (*env)->ReleaseCharArrayElements(env, outArr, out, 0); return position-absolutePos; }
JNIEXPORT jint JNICALL Java_org_apache_harmony_niochar_charset_additional_IBM864_00024Decoder_nDecode (JNIEnv *env, jobject obj, jcharArray outArr, jint arrPosition, jint remaining, jlong inAddr, jint absolutePos) { unsigned int table[] = { 0x001C,0x001B,0x007F,0x001D,0x001E,0x001F, 0x0020,0x0021,0x0022,0x0023,0x0024,0x0025,0x0026,0x0027, 0x0028,0x0029,0x002A,0x002B,0x002C,0x002D,0x002E,0x002F, 0x0030,0x0031,0x0032,0x0033,0x0034,0x0035,0x0036,0x0037, 0x0038,0x0039,0x003A,0x003B,0x003C,0x003D,0x003E,0x003F, 0x0040,0x0041,0x0042,0x0043,0x0044,0x0045,0x0046,0x0047, 0x0048,0x0049,0x004A,0x004B,0x004C,0x004D,0x004E,0x004F, 0x0050,0x0051,0x0052,0x0053,0x0054,0x0055,0x0056,0x0057, 0x0058,0x0059,0x005A,0x005B,0x005C,0x005D,0x005E,0x005F, 0x0060,0x0061,0x0062,0x0063,0x0064,0x0065,0x0066,0x0067, 0x0068,0x0069,0x006A,0x006B,0x006C,0x006D,0x006E,0x006F, 0x0070,0x0071,0x0072,0x0073,0x0074,0x0075,0x0076,0x0077, 0x0078,0x0079,0x007A,0x007B,0x007C,0x007D,0x007E,0x001A, 0x00B0,0x00B7,0x2219,0x221A,0x2592,0x2500,0x2502,0x253C, 0x2524,0x252C,0x251C,0x2534,0x2510,0x250C,0x2514,0x2518, 0x03B2,0x221E,0x03C6,0x00B1,0x00BD,0x00BC,0x2248,0x00AB, 0x00BB,0xFEF7,0xFEF8,0x0000,0x0000,0xFEFB,0xFEFC,0x200B, 0x00A0,0x00AD,0xFE82,0x00A3,0x00A4,0xFE84,0x0000,0x0000, 0xFE8E,0xFE8F,0xFE95,0xFE99,0x060C,0xFE9D,0xFEA1,0xFEA5, 0x0660,0x0661,0x0662,0x0663,0x0664,0x0665,0x0666,0x0667, 0x0668,0x0669,0xFED1,0x061B,0xFEB1,0xFEB5,0xFEB9,0x061F, 0x00A2,0xFE80,0xFE81,0xFE83,0xFE85,0xFECA,0xFE8B,0xFE8D, 0xFE91,0xFE93,0xFE97,0xFE9B,0xFE9F,0xFEA3,0xFEA7,0xFEA9, 0xFEAB,0xFEAD,0xFEAF,0xFEB3,0xFEB7,0xFEBB,0xFEBF,0xFEC3, 0xFEC7,0xFECB,0xFECF,0x00A6,0x00AC,0x00F7,0x00D7,0xFEC9, 0x0640,0xFED3,0xFED7,0xFEDB,0xFEDF,0xFEE3,0xFEE7,0xFEEB, 0xFEED,0xFEEF,0xFEF3,0xFEBD,0xFECC,0xFECE,0xFECD,0xFEE1, 0xFE7D,0xFE7C,0xFEE5,0xFEE9,0xFEEC,0xFEF0,0xFEF2,0xFED0, 0xFED5,0xFEF5,0xFEF6,0xFEDD,0xFED9,0xFEF1,0x25A0,0x0000 }; jchar *out = (*env)->GetCharArrayElements(env, outArr, NULL); jint position = absolutePos; int i; unsigned char input; for(i=0; i < remaining; i++) { input = *(jlong2addr(jbyte, inAddr) + position++); if(input < 0x1A) { out[arrPosition+i] = (jchar)input; }else{ if(table[input - 26] != 0){ out[arrPosition+i] = (jchar)table[input - 26]; }else{ (*env)->ReleaseCharArrayElements(env, outArr, out, 0); return - (position-1 - absolutePos) ; } } } (*env)->ReleaseCharArrayElements(env, outArr, out, 0); return position-absolutePos; }
JNIEXPORT jint JNICALL Java_org_apache_harmony_niochar_charset_additional_IBM852_00024Decoder_nDecode (JNIEnv *env, jobject obj, jcharArray outArr, jint arrPosition, jint remaining, jlong inAddr, jint absolutePos) { unsigned int table[] = { 0x001C,0x001B,0x007F,0x001D,0x001E,0x001F, 0x0020,0x0021,0x0022,0x0023,0x0024,0x0025,0x0026,0x0027, 0x0028,0x0029,0x002A,0x002B,0x002C,0x002D,0x002E,0x002F, 0x0030,0x0031,0x0032,0x0033,0x0034,0x0035,0x0036,0x0037, 0x0038,0x0039,0x003A,0x003B,0x003C,0x003D,0x003E,0x003F, 0x0040,0x0041,0x0042,0x0043,0x0044,0x0045,0x0046,0x0047, 0x0048,0x0049,0x004A,0x004B,0x004C,0x004D,0x004E,0x004F, 0x0050,0x0051,0x0052,0x0053,0x0054,0x0055,0x0056,0x0057, 0x0058,0x0059,0x005A,0x005B,0x005C,0x005D,0x005E,0x005F, 0x0060,0x0061,0x0062,0x0063,0x0064,0x0065,0x0066,0x0067, 0x0068,0x0069,0x006A,0x006B,0x006C,0x006D,0x006E,0x006F, 0x0070,0x0071,0x0072,0x0073,0x0074,0x0075,0x0076,0x0077, 0x0078,0x0079,0x007A,0x007B,0x007C,0x007D,0x007E,0x001A, 0x00C7,0x00FC,0x00E9,0x00E2,0x00E4,0x016F,0x0107,0x00E7, 0x0142,0x00EB,0x0150,0x0151,0x00EE,0x0179,0x00C4,0x0106, 0x00C9,0x0139,0x013A,0x00F4,0x00F6,0x013D,0x013E,0x015A, 0x015B,0x00D6,0x00DC,0x0164,0x0165,0x0141,0x00D7,0x010D, 0x00E1,0x00ED,0x00F3,0x00FA,0x0104,0x0105,0x017D,0x017E, 0x0118,0x0119,0x0000,0x017A,0x010C,0x015F,0x00AB,0x00BB, 0x2591,0x2592,0x2593,0x2502,0x2524,0x00C1,0x00C2,0x011A, 0x015E,0x2563,0x2551,0x2557,0x255D,0x017B,0x017C,0x2510, 0x2514,0x2534,0x252C,0x251C,0x2500,0x253C,0x0102,0x0103, 0x255A,0x2554,0x2569,0x2566,0x2560,0x2550,0x256C,0x00A4, 0x0111,0x0110,0x010E,0x00CB,0x010F,0x0147,0x00CD,0x00CE, 0x011B,0x2518,0x250C,0x2588,0x2584,0x0162,0x016E,0x2580, 0x00D3,0x00DF,0x00D4,0x0143,0x0144,0x0148,0x0160,0x0161, 0x0154,0x00DA,0x0155,0x0170,0x00FD,0x00DD,0x0163,0x00B4, 0x00AD,0x02DD,0x02DB,0x02C7,0x02D8,0x00A7,0x00F7,0x00B8, 0x00B0,0x00A8,0x02D9,0x0171,0x0158,0x0159,0x25A0,0x00A0 }; jchar *out = (*env)->GetCharArrayElements(env, outArr, NULL); jint position = absolutePos; int i; unsigned char input; for(i=0; i < remaining; i++) { input = *(jlong2addr(jbyte, inAddr) + position++); if(input < 0x1A) { out[arrPosition+i] = (jchar)input; }else{ if(table[input - 26] != 0){ out[arrPosition+i] = (jchar)table[input - 26]; }else{ (*env)->ReleaseCharArrayElements(env, outArr, out, 0); return - (position-1 - absolutePos) ; } } } (*env)->ReleaseCharArrayElements(env, outArr, out, 0); return position-absolutePos; }
JNIEXPORT jint JNICALL Java_org_apache_harmony_niochar_charset_additional_TIS_1620_00024Decoder_nDecode (JNIEnv *env, jobject obj, jcharArray outArr, jint arrPosition, jint remaining, jlong inAddr, jint absolutePos) { unsigned int table[] = { 0x001C,0x001B,0x007F,0x001D,0x001E,0x001F, 0x0020,0x0021,0x0022,0x0023,0x0024,0x0025,0x0026,0x0027, 0x0028,0x0029,0x002A,0x002B,0x002C,0x002D,0x002E,0x002F, 0x0030,0x0031,0x0032,0x0033,0x0034,0x0035,0x0036,0x0037, 0x0038,0x0039,0x003A,0x003B,0x003C,0x003D,0x003E,0x003F, 0x0040,0x0041,0x0042,0x0043,0x0044,0x0045,0x0046,0x0047, 0x0048,0x0049,0x004A,0x004B,0x004C,0x004D,0x004E,0x004F, 0x0050,0x0051,0x0052,0x0053,0x0054,0x0055,0x0056,0x0057, 0x0058,0x0059,0x005A,0x005B,0x005C,0x005D,0x005E,0x005F, 0x0060,0x0061,0x0062,0x0063,0x0064,0x0065,0x0066,0x0067, 0x0068,0x0069,0x006A,0x006B,0x006C,0x006D,0x006E,0x006F, 0x0070,0x0071,0x0072,0x0073,0x0074,0x0075,0x0076,0x0077, 0x0078,0x0079,0x007A,0x007B,0x007C,0x007D,0x007E,0x001A, 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, 0x0E48,0x0E01,0x0E02,0x0E03,0x0E04,0x0E05,0x0E06,0x0E07, 0x0E08,0x0E09,0x0E0A,0x0E0B,0x0E0C,0x0E0D,0x0E0E,0x0E0F, 0x0E10,0x0E11,0x0E12,0x0E13,0x0E14,0x0E15,0x0E16,0x0E17, 0x0E18,0x0E19,0x0E1A,0x0E1B,0x0E1C,0x0E1D,0x0E1E,0x0E1F, 0x0E20,0x0E21,0x0E22,0x0E23,0x0E24,0x0E25,0x0E26,0x0E27, 0x0E28,0x0E29,0x0E2A,0x0E2B,0x0E2C,0x0E2D,0x0E2E,0x0E2F, 0x0E30,0x0E31,0x0E32,0x0E33,0x0E34,0x0E35,0x0E36,0x0E37, 0x0E38,0x0E39,0x0E3A,0x0E49,0x0E4A,0x0E4B,0x0E4C,0x0E3F, 0x0E40,0x0E41,0x0E42,0x0E43,0x0E44,0x0E45,0x0E46,0x0E47, 0x0E48,0x0E49,0x0E4A,0x0E4B,0x0E4C,0x0E4D,0x0E4E,0x0E4F, 0x0E50,0x0E51,0x0E52,0x0E53,0x0E54,0x0E55,0x0E56,0x0E57, 0x0E58,0x0E59,0x0E5A,0x0E5B,0x00A2,0x00AC,0x00A6,0x00A0 }; jchar *out = (*env)->GetCharArrayElements(env, outArr, NULL); jint position = absolutePos; int i; unsigned char input; for(i=0; i < remaining; i++) { input = *(jlong2addr(jbyte, inAddr) + position++); if(input < 0x1A) { out[arrPosition+i] = (jchar)input; } else { if(table[input - 26] != 0) { out[arrPosition+i] = (jchar)table[input - 26]; } else { (*env)->ReleaseCharArrayElements(env, outArr, out, 0); return - (position-1 - absolutePos) ; } } } (*env)->ReleaseCharArrayElements(env, outArr, out, 0); return position-absolutePos; }
JNIEXPORT jint JNICALL Java_org_apache_harmony_niochar_charset_additional_x_1IBM1123_00024Decoder_nDecode (JNIEnv *env, jobject obj, jcharArray outArr, jint arrPosition, jint remaining, jlong inAddr, jint absolutePos) { unsigned int table[] = { 0x009C,0x0009,0x0086,0x007F, 0x0097,0x008D,0x008E,0x000B,0x000C,0x000D,0x000E,0x000F, 0x0010,0x0011,0x0012,0x0013,0x009D,0x0085,0x0008,0x0087, 0x0018,0x0019,0x0092,0x008F,0x001C,0x001D,0x001E,0x001F, 0x0080,0x0081,0x0082,0x0083,0x0084,0x000A,0x0017,0x001B, 0x0088,0x0089,0x008A,0x008B,0x008C,0x0005,0x0006,0x0007, 0x0090,0x0091,0x0016,0x0093,0x0094,0x0095,0x0096,0x0004, 0x0098,0x0099,0x009A,0x009B,0x0014,0x0015,0x009E,0x001A, 0x0020,0x00A0,0x0452,0x0491,0x0451,0x0454,0x0455,0x0456, 0x0457,0x0458,0x005B,0x002E,0x003C,0x0028,0x002B,0x0021, 0x0026,0x0459,0x045A,0x045B,0x045C,0x045E,0x045F,0x042A, 0x2116,0x0402,0x005D,0x0024,0x002A,0x0029,0x003B,0x005E, 0x002D,0x002F,0x0490,0x0401,0x0404,0x0405,0x0406,0x0407, 0x0408,0x0409,0x007C,0x002C,0x0025,0x005F,0x003E,0x003F, 0x040A,0x040B,0x040C,0x00AD,0x040E,0x040F,0x044E,0x0430, 0x0431,0x0060,0x003A,0x0023,0x0040,0x0027,0x003D,0x0022, 0x0446,0x0061,0x0062,0x0063,0x0064,0x0065,0x0066,0x0067, 0x0068,0x0069,0x0434,0x0435,0x0444,0x0433,0x0445,0x0438, 0x0439,0x006A,0x006B,0x006C,0x006D,0x006E,0x006F,0x0070, 0x0071,0x0072,0x043A,0x043B,0x043C,0x043D,0x043E,0x043F, 0x044F,0x007E,0x0073,0x0074,0x0075,0x0076,0x0077,0x0078, 0x0079,0x007A,0x0440,0x0441,0x0442,0x0443,0x0436,0x0432, 0x044C,0x044B,0x0437,0x0448,0x044D,0x0449,0x0447,0x044A, 0x042E,0x0410,0x0411,0x0426,0x0414,0x0415,0x0424,0x0413, 0x007B,0x0041,0x0042,0x0043,0x0044,0x0045,0x0046,0x0047, 0x0048,0x0049,0x0425,0x0418,0x0419,0x041A,0x041B,0x041C, 0x007D,0x004A,0x004B,0x004C,0x004D,0x004E,0x004F,0x0050, 0x0051,0x0052,0x041D,0x041E,0x041F,0x042F,0x0420,0x0421, 0x005C,0x00A7,0x0053,0x0054,0x0055,0x0056,0x0057,0x0058, 0x0059,0x005A,0x0422,0x0423,0x0416,0x0412,0x042C,0x042B, 0x0030,0x0031,0x0032,0x0033,0x0034,0x0035,0x0036,0x0037, 0x0038,0x0039,0x0417,0x0428,0x042D,0x0429,0x0427,0x009F }; jchar *out = (*env)->GetCharArrayElements(env, outArr, NULL); jint position = absolutePos; int i; unsigned char input; for(i=0; i < remaining; i++) { input = *(jlong2addr(jbyte, inAddr) + position++); if(input < 0x04) { out[arrPosition+i] = (jchar)input; }else{ out[arrPosition+i] = (jchar)table[input - 4]; } } (*env)->ReleaseCharArrayElements(env, outArr, out, 0); return position-absolutePos; }
JNIEXPORT jint JNICALL Java_org_apache_harmony_niochar_charset_additional_IBM865_00024Decoder_nDecode (JNIEnv *env, jobject obj, jcharArray outArr, jint arrPosition, jint remaining, jlong inAddr, jint absolutePos) { unsigned int table[] = { 0x001C,0x001B,0x007F,0x001D,0x001E,0x001F, 0x0020,0x0021,0x0022,0x0023,0x0024,0x0025,0x0026,0x0027, 0x0028,0x0029,0x002A,0x002B,0x002C,0x002D,0x002E,0x002F, 0x0030,0x0031,0x0032,0x0033,0x0034,0x0035,0x0036,0x0037, 0x0038,0x0039,0x003A,0x003B,0x003C,0x003D,0x003E,0x003F, 0x0040,0x0041,0x0042,0x0043,0x0044,0x0045,0x0046,0x0047, 0x0048,0x0049,0x004A,0x004B,0x004C,0x004D,0x004E,0x004F, 0x0050,0x0051,0x0052,0x0053,0x0054,0x0055,0x0056,0x0057, 0x0058,0x0059,0x005A,0x005B,0x005C,0x005D,0x005E,0x005F, 0x0060,0x0061,0x0062,0x0063,0x0064,0x0065,0x0066,0x0067, 0x0068,0x0069,0x006A,0x006B,0x006C,0x006D,0x006E,0x006F, 0x0070,0x0071,0x0072,0x0073,0x0074,0x0075,0x0076,0x0077, 0x0078,0x0079,0x007A,0x007B,0x007C,0x007D,0x007E,0x001A, 0x00C7,0x00FC,0x00E9,0x00E2,0x00E4,0x00E0,0x00E5,0x00E7, 0x00EA,0x00EB,0x00E8,0x00EF,0x00EE,0x00EC,0x00C4,0x00C5, 0x00C9,0x00E6,0x00C6,0x00F4,0x00F6,0x00F2,0x00FB,0x00F9, 0x00FF,0x00D6,0x00DC,0x00F8,0x00A3,0x00D8,0x20A7,0x0192, 0x00E1,0x00ED,0x00F3,0x00FA,0x00F1,0x00D1,0x00AA,0x00BA, 0x00BF,0x2310,0x00AC,0x00BD,0x00BC,0x00A1,0x00AB,0x00A4, 0x2591,0x2592,0x2593,0x2502,0x2524,0x2561,0x2562,0x2556, 0x2555,0x2563,0x2551,0x2557,0x255D,0x255C,0x255B,0x2510, 0x2514,0x2534,0x252C,0x251C,0x2500,0x253C,0x255E,0x255F, 0x255A,0x2554,0x2569,0x2566,0x2560,0x2550,0x256C,0x2567, 0x2568,0x2564,0x2565,0x2559,0x2558,0x2552,0x2553,0x256B, 0x256A,0x2518,0x250C,0x2588,0x2584,0x258C,0x2590,0x2580, 0x03B1,0x00DF,0x0393,0x03C0,0x03A3,0x03C3,0x03BC,0x03C4, 0x03A6,0x0398,0x03A9,0x03B4,0x221E,0x03C6,0x03B5,0x2229, 0x2261,0x00B1,0x2265,0x2264,0x2320,0x2321,0x00F7,0x2248, 0x00B0,0x2219,0x00B7,0x221A,0x207F,0x00B2,0x25A0,0x00A0 }; jchar *out = (*env)->GetCharArrayElements(env, outArr, NULL); jint position = absolutePos; int i; unsigned char input; for(i=0; i < remaining; i++) { input = *(jlong2addr(jbyte, inAddr) + position++); if(input < 0x1A) { out[arrPosition+i] = (jchar)input; }else{ out[arrPosition+i] = (jchar)table[input - 26]; } } (*env)->ReleaseCharArrayElements(env, outArr, out, 0); return position-absolutePos; }
JNIEXPORT jint JNICALL Java_org_apache_harmony_niochar_charset_additional_ISO_18859_13_00024Decoder_nDecode (JNIEnv *env, jobject obj, jcharArray outArr, jint arrPosition, jint remaining, jlong inAddr, jint absolutePos) { unsigned int table[] = { 0x0126,0x02D8,0x00A3,0x00A4,0x0000,0x0124,0x00A7, 0x00A8,0x0130,0x015E,0x011E,0x0134,0x00AD,0x0000,0x017B, 0x00B0,0x0127,0x00B2,0x00B3,0x00B4,0x00B5,0x0125,0x00B7, 0x00B8,0x0131,0x015F,0x011F,0x0135,0x00BD,0x0000,0x017C, 0x00C0,0x00C1,0x00C2,0x0000,0x00C4,0x010A,0x0108,0x00C7, 0x00C8,0x00C9,0x00CA,0x00CB,0x00CC,0x00CD,0x00CE,0x00CF, 0x0000,0x00D1,0x00D2,0x00D3,0x00D4,0x0120,0x00D6,0x00D7, 0x011C,0x00D9,0x00DA,0x00DB,0x00DC,0x016C,0x015C,0x00DF, 0x00E0,0x00E1,0x00E2,0x0000,0x00E4,0x010B,0x0109,0x00E7, 0x00E8,0x00E9,0x00EA,0x00EB,0x00EC,0x00ED,0x00EE,0x00EF, 0x0000,0x00F1,0x00F2,0x00F3,0x00F4,0x0121,0x00F6,0x00F7, 0x011D,0x00F9,0x00FA,0x00FB,0x00FC,0x016D,0x015D,0x02D9 }; jchar *out = (*env)->GetCharArrayElements(env, outArr, NULL); jint position = absolutePos; int i; unsigned char input; for(i=0; i < remaining; i++) { input = *(jlong2addr(jbyte, inAddr) + position++); if(input < 0xA1) { out[arrPosition+i] = (jchar)input; } else { if(table[input - 161] != 0) { out[arrPosition+i] = (jchar)table[input - 161]; } else { (*env)->ReleaseCharArrayElements(env, outArr, out, 0); return - (position-1 - absolutePos) ; } } } (*env)->ReleaseCharArrayElements(env, outArr, out, 0); return position-absolutePos; }
JNIEXPORT jint JNICALL Java_org_apache_harmony_niochar_charset_CP_11251_00024Decoder_nDecode (JNIEnv *env, jobject obj, jcharArray outArr, jint arrPosition, jint remaining, jlong inAddr, jint absolutePos) { unsigned int table[] = { 0x0402,0x0403,0x201A,0x0453,0x201E,0x2026,0x2020,0x2021, 0x20AC,0x2030,0x0409,0x2039,0x040A,0x040C,0x040B,0x040F, 0x0452,0x2018,0x2019,0x201C,0x201D,0x2022,0x2013,0x2014, 0x0098,0x2122,0x0459,0x203A,0x045A,0x045C,0x045B,0x045F, 0x00A0,0x040E,0x045E,0x0408,0x00A4,0x0490,0x00A6,0x00A7, 0x0401,0x00A9,0x0404,0x00AB,0x00AC,0x00AD,0x00AE,0x0407, 0x00B0,0x00B1,0x0406,0x0456,0x0491,0x00B5,0x00B6,0x00B7, 0x0451,0x2116,0x0454,0x00BB,0x0458,0x0405,0x0455,0x0457, 0x0410,0x0411,0x0412,0x0413,0x0414,0x0415,0x0416,0x0417, 0x0418,0x0419,0x041A,0x041B,0x041C,0x041D,0x041E,0x041F, 0x0420,0x0421,0x0422,0x0423,0x0424,0x0425,0x0426,0x0427, 0x0428,0x0429,0x042A,0x042B,0x042C,0x042D,0x042E,0x042F, 0x0430,0x0431,0x0432,0x0433,0x0434,0x0435,0x0436,0x0437, 0x0438,0x0439,0x043A,0x043B,0x043C,0x043D,0x043E,0x043F, 0x0440,0x0441,0x0442,0x0443,0x0444,0x0445,0x0446,0x0447, 0x0448,0x0449,0x044A,0x044B,0x044C,0x044D,0x044E,0x044F }; jchar *out = (*env)->GetCharArrayElements(env, outArr, NULL); jint position = absolutePos; int i; unsigned char input; for(i=0; i < remaining; i++) { input = *(jlong2addr(jbyte, inAddr) + position++); if(input < 0x80) { out[arrPosition+i] = (jchar)input; }else{ out[arrPosition+i] = (jchar)table[input - 128]; } } (*env)->ReleaseCharArrayElements(env, outArr, out, 0); return position-absolutePos; }
JNIEXPORT jint JNICALL Java_org_apache_harmony_niochar_charset_KOI8_1R_00024Decoder_nDecode (JNIEnv *env, jobject obj, jcharArray outArr, jint arrPosition, jint remaining, jlong inAddr, jint absolutePos) { unsigned int table[] = { 0x2500,0x2502,0x250C,0x2510,0x2514,0x2518,0x251C,0x2524, 0x252C,0x2534,0x253C,0x2580,0x2584,0x2588,0x258C,0x2590, 0x2591,0x2592,0x2593,0x2320,0x25A0,0x2219,0x221A,0x2248, 0x2264,0x2265,0x00A0,0x2321,0x00B0,0x00B2,0x00B7,0x00F7, 0x2550,0x2551,0x2552,0x0451,0x2553,0x2554,0x2555,0x2556, 0x2557,0x2558,0x2559,0x255A,0x255B,0x255C,0x255D,0x255E, 0x255F,0x2560,0x2561,0x0401,0x2562,0x2563,0x2564,0x2565, 0x2566,0x2567,0x2568,0x2569,0x256A,0x256B,0x256C,0x00A9, 0x044E,0x0430,0x0431,0x0446,0x0434,0x0435,0x0444,0x0433, 0x0445,0x0438,0x0439,0x043A,0x043B,0x043C,0x043D,0x043E, 0x043F,0x044F,0x0440,0x0441,0x0442,0x0443,0x0436,0x0432, 0x044C,0x044B,0x0437,0x0448,0x044D,0x0449,0x0447,0x044A, 0x042E,0x0410,0x0411,0x0426,0x0414,0x0415,0x0424,0x0413, 0x0425,0x0418,0x0419,0x041A,0x041B,0x041C,0x041D,0x041E, 0x041F,0x042F,0x0420,0x0421,0x0422,0x0423,0x0416,0x0412, 0x042C,0x042B,0x0417,0x0428,0x042D,0x0429,0x0427,0x042A }; jchar *out = (*env)->GetCharArrayElements(env, outArr, NULL); jint position = absolutePos; int i; unsigned char input; for(i=0; i < remaining; i++) { input = *(jlong2addr(jbyte, inAddr) + position++); if(input < 0x80) { out[arrPosition+i] = (jchar)input; }else{ out[arrPosition+i] = (jchar)table[input - 128]; } } (*env)->ReleaseCharArrayElements(env, outArr, out, 0); return position-absolutePos; }
JNIEXPORT jint JNICALL Java_org_apache_harmony_niochar_charset_additional_x_1MacGreek_00024Decoder_nDecode (JNIEnv *env, jobject obj, jcharArray outArr, jint arrPosition, jint remaining, jlong inAddr, jint absolutePos) { unsigned int table[] = { 0x00C4,0x00B9,0x00B2,0x00C9,0x00B3,0x00D6,0x00DC,0x0385, 0x00E0,0x00E2,0x00E4,0x0384,0x00A8,0x00E7,0x00E9,0x00E8, 0x00EA,0x00EB,0x00A3,0x2122,0x00EE,0x00EF,0x2022,0x00BD, 0x2030,0x00F4,0x00F6,0x00A6,0x00AD,0x00F9,0x00FB,0x00FC, 0x2020,0x0393,0x0394,0x0398,0x039B,0x039E,0x03A0,0x00DF, 0x00AE,0x00A9,0x03A3,0x03AA,0x00A7,0x2260,0x00B0,0x00B7, 0x0391,0x00B1,0x2264,0x2265,0x00A5,0x0392,0x0395,0x0396, 0x0397,0x0399,0x039A,0x039C,0x03A6,0x03AB,0x03A8,0x03A9, 0x03AC,0x039D,0x00AC,0x039F,0x03A1,0x2248,0x03A4,0x00AB, 0x00BB,0x2026,0x00A0,0x03A5,0x03A7,0x0386,0x0388,0x0153, 0x2013,0x2015,0x201C,0x201D,0x2018,0x2019,0x00F7,0x0389, 0x038A,0x038C,0x038E,0x03AD,0x03AE,0x03AF,0x03CC,0x038F, 0x03CD,0x03B1,0x03B2,0x03C8,0x03B4,0x03B5,0x03C6,0x03B3, 0x03B7,0x03B9,0x03BE,0x03BA,0x03BB,0x03BC,0x03BD,0x03BF, 0x03C0,0x03CE,0x03C1,0x03C3,0x03C4,0x03B8,0x03C9,0x03C2, 0x03C7,0x03C5,0x03B6,0x03CA,0x03CB,0x0390,0x03B0,0xF8A0 }; jchar *out = (*env)->GetCharArrayElements(env, outArr, NULL); jint position = absolutePos; int i; unsigned char input; for(i=0; i < remaining; i++) { input = *(jlong2addr(jbyte, inAddr) + position++); if(input < 0x80) { out[arrPosition+i] = (jchar)input; }else{ out[arrPosition+i] = (jchar)table[input - 128]; } } (*env)->ReleaseCharArrayElements(env, outArr, out, 0); return position-absolutePos; }
JNIEXPORT jint JNICALL Java_org_apache_harmony_niochar_charset_CP_11250_00024Decoder_nDecode (JNIEnv *env, jobject obj, jcharArray outArr, jint arrPosition, jint remaining, jlong inAddr, jint absolutePos) { unsigned int table[] = { 0x20AC,0x0081,0x201A,0x0083,0x201E,0x2026,0x2020,0x2021, 0x0088,0x2030,0x0160,0x2039,0x015A,0x0164,0x017D,0x0179, 0x0090,0x2018,0x2019,0x201C,0x201D,0x2022,0x2013,0x2014, 0x0098,0x2122,0x0161,0x203A,0x015B,0x0165,0x017E,0x017A, 0x00A0,0x02C7,0x02D8,0x0141,0x00A4,0x0104,0x00A6,0x00A7, 0x00A8,0x00A9,0x015E,0x00AB,0x00AC,0x00AD,0x00AE,0x017B, 0x00B0,0x00B1,0x02DB,0x0142,0x00B4,0x00B5,0x00B6,0x00B7, 0x00B8,0x0105,0x015F,0x00BB,0x013D,0x02DD,0x013E,0x017C, 0x0154,0x00C1,0x00C2,0x0102,0x00C4,0x0139,0x0106,0x00C7, 0x010C,0x00C9,0x0118,0x00CB,0x011A,0x00CD,0x00CE,0x010E, 0x0110,0x0143,0x0147,0x00D3,0x00D4,0x0150,0x00D6,0x00D7, 0x0158,0x016E,0x00DA,0x0170,0x00DC,0x00DD,0x0162,0x00DF, 0x0155,0x00E1,0x00E2,0x0103,0x00E4,0x013A,0x0107,0x00E7, 0x010D,0x00E9,0x0119,0x00EB,0x011B,0x00ED,0x00EE,0x010F, 0x0111,0x0144,0x0148,0x00F3,0x00F4,0x0151,0x00F6,0x00F7, 0x0159,0x016F,0x00FA,0x0171,0x00FC,0x00FD,0x0163,0x02D9 }; jchar *out = (*env)->GetCharArrayElements(env, outArr, NULL); jint position = absolutePos; int i; unsigned char input; for(i=0; i < remaining; i++) { input = *(jlong2addr(jbyte, inAddr) + position++); if(input < 0x80) { out[arrPosition+i] = (jchar)input; } else { out[arrPosition+i] = (jchar)table[input - 128]; } } (*env)->ReleaseCharArrayElements(env, outArr, out, 0); return position-absolutePos; }
JNIEXPORT void JNICALL Java_org_apache_harmony_niochar_charset_additional_IBM865_00024Encoder_nEncode (JNIEnv *env, jobject obj, jlong outAddr, jint absolutePos, jcharArray array, jint arrayOffset, jintArray result){ static jboolean table[] = { 0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F, 0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x7F,0x1B,0x1A,0x1D,0x1E,0x1F, 0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F, 0x30,0x31,0x32,0x33,0x34,0x35,0x36,0x37,0x38,0x39,0x3A,0x3B,0x3C,0x3D,0x3E,0x3F, 0x40,0x41,0x42,0x43,0x44,0x45,0x46,0x47,0x48,0x49,0x4A,0x4B,0x4C,0x4D,0x4E,0x4F, 0x50,0x51,0x52,0x53,0x54,0x55,0x56,0x57,0x58,0x59,0x5A,0x5B,0x5C,0x5D,0x5E,0x5F, 0x60,0x61,0x62,0x63,0x64,0x65,0x66,0x67,0x68,0x69,0x6A,0x6B,0x6C,0x6D,0x6E,0x6F, 0x70,0x71,0x72,0x73,0x74,0x75,0x76,0x77,0x78,0x79,0x7A,0x7B,0x7C,0x7D,0x7E,0x1C, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0xFF,0xAD,0x00,0x9C,0xAF,0x00,0x00,0x00,0x00,0x00,0xA6,0xAE,0xAA,0x00,0x00,0x00, 0xF8,0xF1,0xFD,0x00,0x00,0x00,0x00,0xFA,0x00,0x00,0xA7,0x00,0xAC,0xAB,0x00,0xA8, 0x00,0x00,0x00,0x00,0x8E,0x8F,0x92,0x80,0x00,0x90,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0xA5,0x00,0x00,0x00,0x00,0x99,0x00,0x9D,0x00,0x00,0x00,0x9A,0x00,0x00,0xE1, 0x85,0xA0,0x83,0x00,0x84,0x86,0x91,0x87,0x8A,0x82,0x88,0x89,0x8D,0xA1,0x8C,0x8B, 0x00,0xA4,0x95,0xA2,0x93,0x00,0x94,0xF6,0x9B,0x97,0xA3,0x96,0x81,0x00,0x00,0x98, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x9F,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0xE2,0x00,0x00,0x00,0x00,0xE9,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0xE4,0x00,0x00,0xE8,0x00,0x00,0xEA,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0xE0,0x00,0x00,0xEB,0xEE,0x00,0x00,0x00,0x00,0x00,0x00,0xE6,0x00,0x00,0x00, 0xE3,0x00,0x00,0xE5,0xE7,0x00,0xED,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFC, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x9E,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xF9,0xFB,0x00,0x00,0x00,0xEC,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xEF,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xF7,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0xF0,0x00,0x00,0xF3,0xF2,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0xA9,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0xF4,0xF5,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0xC4,0x00,0xB3,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xDA,0x00,0x00,0x00, 0xBF,0x00,0x00,0x00,0xC0,0x00,0x00,0x00,0xD9,0x00,0x00,0x00,0xC3,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0xB4,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xC2,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0xC1,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xC5,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0xCD,0xBA,0xD5,0xD6,0xC9,0xB8,0xB7,0xBB,0xD4,0xD3,0xC8,0xBE,0xBD,0xBC,0xC6,0xC7, 0xCC,0xB5,0xB6,0xB9,0xD1,0xD2,0xCB,0xCF,0xD0,0xCA,0xD8,0xD7,0xCE,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0xDF,0x00,0x00,0x00,0xDC,0x00,0x00,0x00,0xDB,0x00,0x00,0x00,0xDD,0x00,0x00,0x00, 0xDE,0xB0,0xB1,0xB2,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0xFE,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }; static int encodeIndex[] = { 0,1,-1,2,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1, 3,-1,4,5,-1,6,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1, -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1, -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1, -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1, -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1, -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1, -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1 }; jint position = absolutePos; int i; jchar input1; jchar *in = (*env)->GetCharArrayElements(env, array, NULL); jint *res = (*env)->GetIntArrayElements(env, result, NULL); for(i=0; i<res[0]; i++) { jchar input = in[arrayOffset+i]; if( input > 0x25A0) { if (input >= 0xD800 && input <= 0xDFFF) { if(i+1<res[0]) { input1 = in[arrayOffset+i+1]; if(input1 >= 0xD800 && input1 <= 0xDFFF) { res[0] = absolutePos - position; res[1] = 2; (*env)->ReleaseIntArrayElements(env, result, res, 0); (*env)->ReleaseCharArrayElements(env, array, in, 0); return; } } else { res[0]=absolutePos - position; res[1] = 0; (*env)->ReleaseIntArrayElements(env, result, res, 0); (*env)->ReleaseCharArrayElements(env, array, in, 0); return; } res[0]=absolutePos - position; res[1] = -1; (*env)->ReleaseIntArrayElements(env, result, res, 0); (*env)->ReleaseCharArrayElements(env, array, in, 0); return; } res[0]=absolutePos - position; res[1] = 1; (*env)->ReleaseCharArrayElements(env, array, in, 0); (*env)->ReleaseIntArrayElements(env, result, res, 0); return; } if( input < 0x1A ) { *(jlong2addr(jbyte, outAddr) + position++) = (jbyte)input; }else{ int index = (int)input >> 8; index = encodeIndex[index]; if(index < 0) { res[0]=absolutePos - position; res[1] = 1; (*env)->ReleaseCharArrayElements(env, array, in, 0); (*env)->ReleaseIntArrayElements(env, result, res, 0); return; } index <<= 8; index += (int)input & 0xFF; if(table[input] != 0){ *(jlong2addr(jbyte, outAddr) + position++) = table[input]; }else{ res[0]= absolutePos - position; res[1]=1; (*env)->ReleaseIntArrayElements(env, result, res, 0); (*env)->ReleaseCharArrayElements(env, array, in, 0); return; } } } res[0]=position - absolutePos; (*env)->ReleaseIntArrayElements(env, result, res, 0); (*env)->ReleaseCharArrayElements(env, array, in, 0); return; }