2023-09-27 12:24:48 -04:00
|
|
|
#include "prism/enc/pm_encoding.h"
|
2023-08-15 10:00:54 -07:00
|
|
|
|
2023-10-31 08:54:52 -04:00
|
|
|
/**
|
|
|
|
* Each element of the following table contains a bitfield that indicates a
|
|
|
|
* piece of information about the corresponding ASCII character.
|
|
|
|
*/
|
2023-09-27 12:24:48 -04:00
|
|
|
static uint8_t pm_encoding_ascii_table[256] = {
|
2023-08-15 10:00:54 -07:00
|
|
|
// 0 1 2 3 4 5 6 7 8 9 A B C D E F
|
|
|
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 0x
|
|
|
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 1x
|
|
|
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 2x
|
|
|
|
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 0, 0, 0, 0, 0, // 3x
|
|
|
|
0, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, // 4x
|
|
|
|
7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 0, 0, 0, 0, 0, // 5x
|
|
|
|
0, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, // 6x
|
|
|
|
3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 0, 0, 0, 0, 0, // 7x
|
|
|
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 8x
|
|
|
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 9x
|
|
|
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // Ax
|
|
|
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // Bx
|
|
|
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // Cx
|
|
|
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // Dx
|
|
|
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // Ex
|
|
|
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // Fx
|
|
|
|
};
|
|
|
|
|
2023-11-11 23:11:44 -05:00
|
|
|
/**
|
|
|
|
* Each element of the following table contains a bitfield that indicates a
|
|
|
|
* piece of information about the corresponding CP850 character.
|
|
|
|
*/
|
|
|
|
static uint8_t pm_encoding_cp850_table[256] = {
|
|
|
|
// 0 1 2 3 4 5 6 7 8 9 A B C D E F
|
|
|
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 0x
|
|
|
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 1x
|
|
|
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 2x
|
|
|
|
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 0, 0, 0, 0, 0, // 3x
|
|
|
|
0, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, // 4x
|
|
|
|
7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 0, 0, 0, 0, 0, // 5x
|
|
|
|
0, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, // 6x
|
|
|
|
3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 0, 0, 0, 0, 0, // 7x
|
|
|
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 8x
|
|
|
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 9x
|
|
|
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // Ax
|
|
|
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // Bx
|
|
|
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // Cx
|
|
|
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // Dx
|
|
|
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // Ex
|
|
|
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // Fx
|
|
|
|
};
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Each element of the following table contains a bitfield that indicates a
|
|
|
|
* piece of information about the corresponding CP852 character.
|
|
|
|
*/
|
|
|
|
static uint8_t pm_encoding_cp852_table[256] = {
|
|
|
|
// 0 1 2 3 4 5 6 7 8 9 A B C D E F
|
|
|
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 0x
|
|
|
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 1x
|
|
|
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 2x
|
|
|
|
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 0, 0, 0, 0, 0, // 3x
|
|
|
|
0, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, // 4x
|
|
|
|
7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 0, 0, 0, 0, 0, // 5x
|
|
|
|
0, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, // 6x
|
|
|
|
3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 0, 0, 0, 0, 0, // 7x
|
|
|
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 8x
|
|
|
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 9x
|
|
|
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // Ax
|
|
|
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // Bx
|
|
|
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // Cx
|
|
|
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // Dx
|
|
|
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // Ex
|
|
|
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // Fx
|
|
|
|
};
|
|
|
|
|
2023-11-11 23:15:58 -05:00
|
|
|
/**
|
|
|
|
* Each element of the following table contains a bitfield that indicates a
|
|
|
|
* piece of information about the corresponding CP855 character.
|
|
|
|
*/
|
|
|
|
static uint8_t pm_encoding_cp855_table[256] = {
|
|
|
|
// 0 1 2 3 4 5 6 7 8 9 A B C D E F
|
|
|
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 0x
|
|
|
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 1x
|
|
|
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 2x
|
|
|
|
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 0, 0, 0, 0, 0, // 3x
|
|
|
|
0, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, // 4x
|
|
|
|
7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 0, 0, 0, 0, 0, // 5x
|
|
|
|
0, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, // 6x
|
|
|
|
3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 0, 0, 0, 0, 0, // 7x
|
|
|
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 8x
|
|
|
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 9x
|
|
|
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // Ax
|
|
|
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // Bx
|
|
|
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // Cx
|
|
|
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // Dx
|
|
|
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // Ex
|
|
|
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // Fx
|
|
|
|
};
|
|
|
|
|
2023-11-11 23:41:53 -05:00
|
|
|
/**
|
|
|
|
* Each element of the following table contains a bitfield that indicates a
|
|
|
|
* piece of information about the corresponding IBM437 character.
|
|
|
|
*/
|
|
|
|
static uint8_t pm_encoding_ibm437_table[256] = {
|
|
|
|
// 0 1 2 3 4 5 6 7 8 9 A B C D E F
|
|
|
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 0x
|
|
|
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 1x
|
|
|
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 2x
|
|
|
|
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 0, 0, 0, 0, 0, // 3x
|
|
|
|
0, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, // 4x
|
|
|
|
7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 0, 0, 0, 0, 0, // 5x
|
|
|
|
0, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, // 6x
|
|
|
|
3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 0, 0, 0, 0, 0, // 7x
|
|
|
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 8x
|
|
|
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 9x
|
|
|
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // Ax
|
|
|
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // Bx
|
|
|
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // Cx
|
|
|
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // Dx
|
|
|
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // Ex
|
|
|
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // Fx
|
|
|
|
};
|
|
|
|
|
2023-11-11 23:44:31 -05:00
|
|
|
/**
|
|
|
|
* Each element of the following table contains a bitfield that indicates a
|
|
|
|
* piece of information about the corresponding IBM720 character.
|
|
|
|
*/
|
|
|
|
static uint8_t pm_encoding_ibm720_table[256] = {
|
|
|
|
// 0 1 2 3 4 5 6 7 8 9 A B C D E F
|
|
|
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 0x
|
|
|
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 1x
|
|
|
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 2x
|
|
|
|
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 0, 0, 0, 0, 0, // 3x
|
|
|
|
0, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, // 4x
|
|
|
|
7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 0, 0, 0, 0, 0, // 5x
|
|
|
|
0, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, // 6x
|
|
|
|
3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 0, 0, 0, 0, 0, // 7x
|
|
|
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 8x
|
|
|
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 9x
|
|
|
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // Ax
|
|
|
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // Bx
|
|
|
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // Cx
|
|
|
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // Dx
|
|
|
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // Ex
|
|
|
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // Fx
|
|
|
|
};
|
|
|
|
|
2023-11-11 23:48:15 -05:00
|
|
|
/**
|
|
|
|
* Each element of the following table contains a bitfield that indicates a
|
|
|
|
* piece of information about the corresponding IBM737 character.
|
|
|
|
*/
|
|
|
|
static uint8_t pm_encoding_ibm737_table[256] = {
|
|
|
|
// 0 1 2 3 4 5 6 7 8 9 A B C D E F
|
|
|
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 0x
|
|
|
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 1x
|
|
|
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 2x
|
|
|
|
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 0, 0, 0, 0, 0, // 3x
|
|
|
|
0, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, // 4x
|
|
|
|
7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 0, 0, 0, 0, 0, // 5x
|
|
|
|
0, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, // 6x
|
|
|
|
3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 0, 0, 0, 0, 0, // 7x
|
|
|
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 8x
|
|
|
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 9x
|
|
|
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // Ax
|
|
|
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // Bx
|
|
|
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // Cx
|
|
|
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // Dx
|
|
|
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // Ex
|
|
|
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // Fx
|
|
|
|
};
|
|
|
|
|
2023-11-11 23:50:23 -05:00
|
|
|
/**
|
|
|
|
* Each element of the following table contains a bitfield that indicates a
|
|
|
|
* piece of information about the corresponding IBM775 character.
|
|
|
|
*/
|
|
|
|
static uint8_t pm_encoding_ibm775_table[256] = {
|
|
|
|
// 0 1 2 3 4 5 6 7 8 9 A B C D E F
|
|
|
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 0x
|
|
|
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 1x
|
|
|
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 2x
|
|
|
|
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 0, 0, 0, 0, 0, // 3x
|
|
|
|
0, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, // 4x
|
|
|
|
7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 0, 0, 0, 0, 0, // 5x
|
|
|
|
0, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, // 6x
|
|
|
|
3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 0, 0, 0, 0, 0, // 7x
|
|
|
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 8x
|
|
|
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 9x
|
|
|
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // Ax
|
|
|
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // Bx
|
|
|
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // Cx
|
|
|
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // Dx
|
|
|
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // Ex
|
|
|
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // Fx
|
|
|
|
};
|
|
|
|
|
2023-11-12 00:07:06 -05:00
|
|
|
/**
|
|
|
|
* Each element of the following table contains a bitfield that indicates a
|
|
|
|
* piece of information about the corresponding IBM852 character.
|
|
|
|
*/
|
|
|
|
static uint8_t pm_encoding_ibm852_table[256] = {
|
|
|
|
// 0 1 2 3 4 5 6 7 8 9 A B C D E F
|
|
|
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 0x
|
|
|
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 1x
|
|
|
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 2x
|
|
|
|
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 0, 0, 0, 0, 0, // 3x
|
|
|
|
0, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, // 4x
|
|
|
|
7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 0, 0, 0, 0, 0, // 5x
|
|
|
|
0, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, // 6x
|
|
|
|
3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 0, 0, 0, 0, 0, // 7x
|
|
|
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 8x
|
|
|
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 9x
|
|
|
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // Ax
|
|
|
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // Bx
|
|
|
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // Cx
|
|
|
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // Dx
|
|
|
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // Ex
|
|
|
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // Fx
|
|
|
|
};
|
|
|
|
|
2023-11-12 00:09:10 -05:00
|
|
|
/**
|
|
|
|
* Each element of the following table contains a bitfield that indicates a
|
|
|
|
* piece of information about the corresponding IBM855 character.
|
|
|
|
*/
|
|
|
|
static uint8_t pm_encoding_ibm855_table[256] = {
|
|
|
|
// 0 1 2 3 4 5 6 7 8 9 A B C D E F
|
|
|
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 0x
|
|
|
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 1x
|
|
|
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 2x
|
|
|
|
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 0, 0, 0, 0, 0, // 3x
|
|
|
|
0, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, // 4x
|
|
|
|
7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 0, 0, 0, 0, 0, // 5x
|
|
|
|
0, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, // 6x
|
|
|
|
3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 0, 0, 0, 0, 0, // 7x
|
|
|
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 8x
|
|
|
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 9x
|
|
|
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // Ax
|
|
|
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // Bx
|
|
|
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // Cx
|
|
|
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // Dx
|
|
|
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // Ex
|
|
|
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // Fx
|
|
|
|
};
|
|
|
|
|
2023-11-12 00:11:14 -05:00
|
|
|
/**
|
|
|
|
* Each element of the following table contains a bitfield that indicates a
|
|
|
|
* piece of information about the corresponding IBM857 character.
|
|
|
|
*/
|
|
|
|
static uint8_t pm_encoding_ibm857_table[256] = {
|
|
|
|
// 0 1 2 3 4 5 6 7 8 9 A B C D E F
|
|
|
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 0x
|
|
|
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 1x
|
|
|
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 2x
|
|
|
|
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 0, 0, 0, 0, 0, // 3x
|
|
|
|
0, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, // 4x
|
|
|
|
7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 0, 0, 0, 0, 0, // 5x
|
|
|
|
0, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, // 6x
|
|
|
|
3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 0, 0, 0, 0, 0, // 7x
|
|
|
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 8x
|
|
|
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 9x
|
|
|
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // Ax
|
|
|
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // Bx
|
|
|
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // Cx
|
|
|
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // Dx
|
|
|
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // Ex
|
|
|
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // Fx
|
|
|
|
};
|
|
|
|
|
2023-11-12 00:13:15 -05:00
|
|
|
/**
|
|
|
|
* Each element of the following table contains a bitfield that indicates a
|
|
|
|
* piece of information about the corresponding IBM860 character.
|
|
|
|
*/
|
|
|
|
static uint8_t pm_encoding_ibm860_table[256] = {
|
|
|
|
// 0 1 2 3 4 5 6 7 8 9 A B C D E F
|
|
|
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 0x
|
|
|
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 1x
|
|
|
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 2x
|
|
|
|
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 0, 0, 0, 0, 0, // 3x
|
|
|
|
0, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, // 4x
|
|
|
|
7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 0, 0, 0, 0, 0, // 5x
|
|
|
|
0, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, // 6x
|
|
|
|
3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 0, 0, 0, 0, 0, // 7x
|
|
|
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 8x
|
|
|
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 9x
|
|
|
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // Ax
|
|
|
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // Bx
|
|
|
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // Cx
|
|
|
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // Dx
|
|
|
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // Ex
|
|
|
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // Fx
|
|
|
|
};
|
|
|
|
|
2023-11-12 00:15:24 -05:00
|
|
|
/**
|
|
|
|
* Each element of the following table contains a bitfield that indicates a
|
|
|
|
* piece of information about the corresponding IBM861 character.
|
|
|
|
*/
|
|
|
|
static uint8_t pm_encoding_ibm861_table[256] = {
|
|
|
|
// 0 1 2 3 4 5 6 7 8 9 A B C D E F
|
|
|
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 0x
|
|
|
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 1x
|
|
|
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 2x
|
|
|
|
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 0, 0, 0, 0, 0, // 3x
|
|
|
|
0, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, // 4x
|
|
|
|
7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 0, 0, 0, 0, 0, // 5x
|
|
|
|
0, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, // 6x
|
|
|
|
3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 0, 0, 0, 0, 0, // 7x
|
|
|
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 8x
|
|
|
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 9x
|
|
|
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // Ax
|
|
|
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // Bx
|
|
|
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // Cx
|
|
|
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // Dx
|
|
|
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // Ex
|
|
|
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // Fx
|
|
|
|
};
|
|
|
|
|
2023-10-31 08:54:52 -04:00
|
|
|
/**
|
|
|
|
* Each element of the following table contains a bitfield that indicates a
|
|
|
|
* piece of information about the corresponding ISO-8859-1 character.
|
|
|
|
*/
|
2023-09-27 12:24:48 -04:00
|
|
|
static uint8_t pm_encoding_iso_8859_1_table[256] = {
|
2023-08-15 10:00:54 -07:00
|
|
|
// 0 1 2 3 4 5 6 7 8 9 A B C D E F
|
|
|
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 0x
|
|
|
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 1x
|
|
|
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 2x
|
|
|
|
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 0, 0, 0, 0, 0, // 3x
|
|
|
|
0, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, // 4x
|
|
|
|
7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 0, 0, 0, 0, 0, // 5x
|
|
|
|
0, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, // 6x
|
|
|
|
3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 0, 0, 0, 0, 0, // 7x
|
|
|
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 8x
|
|
|
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 9x
|
|
|
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, // Ax
|
|
|
|
0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, // Bx
|
|
|
|
7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, // Cx
|
|
|
|
7, 7, 7, 7, 7, 7, 7, 0, 7, 7, 7, 7, 7, 7, 7, 3, // Dx
|
|
|
|
3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, // Ex
|
|
|
|
3, 3, 3, 3, 3, 3, 3, 0, 3, 3, 3, 3, 3, 3, 3, 3, // Fx
|
|
|
|
};
|
|
|
|
|
2023-10-31 08:54:52 -04:00
|
|
|
/**
|
|
|
|
* Each element of the following table contains a bitfield that indicates a
|
|
|
|
* piece of information about the corresponding ISO-8859-2 character.
|
|
|
|
*/
|
2023-09-27 12:24:48 -04:00
|
|
|
static uint8_t pm_encoding_iso_8859_2_table[256] = {
|
2023-08-15 10:00:54 -07:00
|
|
|
// 0 1 2 3 4 5 6 7 8 9 A B C D E F
|
|
|
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 0x
|
|
|
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 1x
|
|
|
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 2x
|
|
|
|
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 0, 0, 0, 0, 0, // 3x
|
|
|
|
0, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, // 4x
|
|
|
|
7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 0, 0, 0, 0, 0, // 5x
|
|
|
|
0, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, // 6x
|
|
|
|
3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 0, 0, 0, 0, 0, // 7x
|
|
|
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 8x
|
|
|
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 9x
|
|
|
|
0, 7, 0, 7, 0, 7, 7, 0, 0, 7, 7, 7, 7, 0, 7, 7, // Ax
|
|
|
|
0, 3, 0, 3, 0, 3, 3, 0, 0, 3, 3, 3, 3, 0, 3, 3, // Bx
|
|
|
|
7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, // Cx
|
|
|
|
7, 7, 7, 7, 7, 7, 7, 0, 7, 7, 7, 7, 7, 7, 7, 3, // Dx
|
|
|
|
3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, // Ex
|
|
|
|
3, 3, 3, 3, 3, 3, 3, 0, 3, 3, 3, 3, 3, 3, 3, 0, // Fx
|
|
|
|
};
|
|
|
|
|
2023-10-31 08:54:52 -04:00
|
|
|
/**
|
|
|
|
* Each element of the following table contains a bitfield that indicates a
|
|
|
|
* piece of information about the corresponding ISO-8859-3 character.
|
|
|
|
*/
|
2023-09-27 12:24:48 -04:00
|
|
|
static uint8_t pm_encoding_iso_8859_3_table[256] = {
|
2023-08-15 10:00:54 -07:00
|
|
|
// 0 1 2 3 4 5 6 7 8 9 A B C D E F
|
|
|
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 0x
|
|
|
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 1x
|
|
|
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 2x
|
|
|
|
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 0, 0, 0, 0, 0, // 3x
|
|
|
|
0, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, // 4x
|
|
|
|
7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 0, 0, 0, 0, 0, // 5x
|
|
|
|
0, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, // 6x
|
|
|
|
3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 0, 0, 0, 0, 0, // 7x
|
|
|
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 8x
|
|
|
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 9x
|
|
|
|
0, 7, 0, 0, 0, 0, 7, 0, 0, 7, 7, 7, 7, 0, 0, 7, // Ax
|
|
|
|
0, 3, 0, 0, 0, 3, 3, 0, 0, 3, 3, 3, 3, 0, 0, 3, // Bx
|
|
|
|
7, 7, 7, 0, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, // Cx
|
|
|
|
0, 7, 7, 7, 7, 7, 7, 0, 7, 7, 7, 7, 7, 7, 7, 3, // Dx
|
|
|
|
3, 3, 3, 0, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, // Ex
|
|
|
|
0, 3, 3, 3, 3, 3, 3, 0, 3, 3, 3, 3, 3, 3, 3, 0, // Fx
|
|
|
|
};
|
|
|
|
|
2023-10-31 08:54:52 -04:00
|
|
|
/**
|
|
|
|
* Each element of the following table contains a bitfield that indicates a
|
|
|
|
* piece of information about the corresponding ISO-8859-4 character.
|
|
|
|
*/
|
2023-09-27 12:24:48 -04:00
|
|
|
static uint8_t pm_encoding_iso_8859_4_table[256] = {
|
2023-08-15 10:00:54 -07:00
|
|
|
// 0 1 2 3 4 5 6 7 8 9 A B C D E F
|
|
|
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 0x
|
|
|
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 1x
|
|
|
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 2x
|
|
|
|
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 0, 0, 0, 0, 0, // 3x
|
|
|
|
0, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, // 4x
|
|
|
|
7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 0, 0, 0, 0, 0, // 5x
|
|
|
|
0, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, // 6x
|
|
|
|
3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 0, 0, 0, 0, 0, // 7x
|
|
|
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 8x
|
|
|
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 9x
|
|
|
|
0, 7, 3, 7, 0, 7, 7, 0, 0, 7, 7, 7, 7, 0, 7, 0, // Ax
|
|
|
|
0, 3, 0, 3, 0, 3, 3, 0, 0, 3, 3, 3, 3, 7, 3, 3, // Bx
|
|
|
|
7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, // Cx
|
|
|
|
7, 7, 7, 7, 7, 7, 7, 0, 7, 7, 7, 7, 7, 7, 7, 3, // Dx
|
|
|
|
3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, // Ex
|
|
|
|
3, 3, 3, 3, 3, 3, 3, 0, 3, 3, 3, 3, 3, 3, 3, 0, // Fx
|
|
|
|
};
|
|
|
|
|
2023-10-31 08:54:52 -04:00
|
|
|
/**
|
|
|
|
* Each element of the following table contains a bitfield that indicates a
|
|
|
|
* piece of information about the corresponding ISO-8859-5 character.
|
|
|
|
*/
|
2023-09-27 12:24:48 -04:00
|
|
|
static uint8_t pm_encoding_iso_8859_5_table[256] = {
|
2023-08-15 10:00:54 -07:00
|
|
|
// 0 1 2 3 4 5 6 7 8 9 A B C D E F
|
|
|
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 0x
|
|
|
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 1x
|
|
|
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 2x
|
|
|
|
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 0, 0, 0, 0, 0, // 3x
|
|
|
|
0, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, // 4x
|
|
|
|
7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 0, 0, 0, 0, 0, // 5x
|
|
|
|
0, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, // 6x
|
|
|
|
3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 0, 0, 0, 0, 0, // 7x
|
|
|
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 8x
|
|
|
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 9x
|
|
|
|
0, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 0, 7, 7, // Ax
|
|
|
|
7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, // Bx
|
|
|
|
7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, // Cx
|
|
|
|
3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, // Dx
|
|
|
|
3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, // Ex
|
|
|
|
0, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 0, 3, 3, // Fx
|
|
|
|
};
|
|
|
|
|
2023-10-31 08:54:52 -04:00
|
|
|
/**
|
|
|
|
* Each element of the following table contains a bitfield that indicates a
|
|
|
|
* piece of information about the corresponding ISO-8859-6 character.
|
|
|
|
*/
|
2023-09-27 12:24:48 -04:00
|
|
|
static uint8_t pm_encoding_iso_8859_6_table[256] = {
|
2023-08-15 10:00:54 -07:00
|
|
|
// 0 1 2 3 4 5 6 7 8 9 A B C D E F
|
|
|
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 0x
|
|
|
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 1x
|
|
|
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 2x
|
|
|
|
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 0, 0, 0, 0, 0, // 3x
|
|
|
|
0, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, // 4x
|
|
|
|
7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 0, 0, 0, 0, 0, // 5x
|
|
|
|
0, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, // 6x
|
|
|
|
3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 0, 0, 0, 0, 0, // 7x
|
|
|
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 8x
|
|
|
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 9x
|
|
|
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // Ax
|
|
|
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // Bx
|
|
|
|
0, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, // Cx
|
|
|
|
3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 0, 0, 0, 0, 0, // Dx
|
|
|
|
3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, // Ex
|
|
|
|
3, 3, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // Fx
|
|
|
|
};
|
|
|
|
|
2023-10-31 08:54:52 -04:00
|
|
|
/**
|
|
|
|
* Each element of the following table contains a bitfield that indicates a
|
|
|
|
* piece of information about the corresponding ISO-8859-7 character.
|
|
|
|
*/
|
2023-09-27 12:24:48 -04:00
|
|
|
static uint8_t pm_encoding_iso_8859_7_table[256] = {
|
2023-08-15 10:00:54 -07:00
|
|
|
// 0 1 2 3 4 5 6 7 8 9 A B C D E F
|
|
|
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 0x
|
|
|
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 1x
|
|
|
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 2x
|
|
|
|
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 0, 0, 0, 0, 0, // 3x
|
|
|
|
0, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, // 4x
|
|
|
|
7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 0, 0, 0, 0, 0, // 5x
|
|
|
|
0, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, // 6x
|
|
|
|
3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 0, 0, 0, 0, 0, // 7x
|
|
|
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 8x
|
|
|
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 9x
|
|
|
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // Ax
|
|
|
|
0, 0, 0, 0, 0, 0, 7, 0, 7, 7, 7, 0, 7, 0, 7, 7, // Bx
|
|
|
|
3, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, // Cx
|
|
|
|
7, 7, 0, 7, 7, 7, 7, 7, 7, 7, 7, 7, 3, 3, 3, 3, // Dx
|
|
|
|
3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, // Ex
|
|
|
|
3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 0, // Fx
|
|
|
|
};
|
|
|
|
|
2023-10-31 08:54:52 -04:00
|
|
|
/**
|
|
|
|
* Each element of the following table contains a bitfield that indicates a
|
|
|
|
* piece of information about the corresponding ISO-8859-8 character.
|
|
|
|
*/
|
2023-09-27 12:24:48 -04:00
|
|
|
static uint8_t pm_encoding_iso_8859_8_table[256] = {
|
2023-08-15 10:00:54 -07:00
|
|
|
// 0 1 2 3 4 5 6 7 8 9 A B C D E F
|
|
|
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 0x
|
|
|
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 1x
|
|
|
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 2x
|
|
|
|
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 0, 0, 0, 0, 0, // 3x
|
|
|
|
0, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, // 4x
|
|
|
|
7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 0, 0, 0, 0, 0, // 5x
|
|
|
|
0, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, // 6x
|
|
|
|
3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 0, 0, 0, 0, 0, // 7x
|
|
|
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 8x
|
|
|
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 9x
|
|
|
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // Ax
|
|
|
|
0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // Bx
|
|
|
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // Cx
|
|
|
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // Dx
|
|
|
|
3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, // Ex
|
|
|
|
3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 0, 0, 0, 0, 0, // Fx
|
|
|
|
};
|
|
|
|
|
2023-10-31 08:54:52 -04:00
|
|
|
/**
|
|
|
|
* Each element of the following table contains a bitfield that indicates a
|
|
|
|
* piece of information about the corresponding ISO-8859-9 character.
|
|
|
|
*/
|
2023-09-27 12:24:48 -04:00
|
|
|
static uint8_t pm_encoding_iso_8859_9_table[256] = {
|
2023-08-15 10:00:54 -07:00
|
|
|
// 0 1 2 3 4 5 6 7 8 9 A B C D E F
|
|
|
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 0x
|
|
|
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 1x
|
|
|
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 2x
|
|
|
|
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 0, 0, 0, 0, 0, // 3x
|
|
|
|
0, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, // 4x
|
|
|
|
7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 0, 0, 0, 0, 0, // 5x
|
|
|
|
0, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, // 6x
|
|
|
|
3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 0, 0, 0, 0, 0, // 7x
|
|
|
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 8x
|
|
|
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 9x
|
|
|
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, // Ax
|
|
|
|
0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, // Bx
|
|
|
|
7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, // Cx
|
|
|
|
7, 7, 7, 7, 7, 7, 7, 0, 7, 7, 7, 7, 7, 7, 7, 3, // Dx
|
|
|
|
3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, // Ex
|
|
|
|
3, 3, 3, 3, 3, 3, 3, 0, 3, 3, 3, 3, 3, 3, 3, 3, // Fx
|
|
|
|
};
|
|
|
|
|
2023-10-31 08:54:52 -04:00
|
|
|
/**
|
|
|
|
* Each element of the following table contains a bitfield that indicates a
|
|
|
|
* piece of information about the corresponding ISO-8859-10 character.
|
|
|
|
*/
|
2023-09-27 12:24:48 -04:00
|
|
|
static uint8_t pm_encoding_iso_8859_10_table[256] = {
|
2023-08-15 10:00:54 -07:00
|
|
|
// 0 1 2 3 4 5 6 7 8 9 A B C D E F
|
|
|
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 0x
|
|
|
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 1x
|
|
|
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 2x
|
|
|
|
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 0, 0, 0, 0, 0, // 3x
|
|
|
|
0, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, // 4x
|
|
|
|
7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 0, 0, 0, 0, 0, // 5x
|
|
|
|
0, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, // 6x
|
|
|
|
3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 0, 0, 0, 0, 0, // 7x
|
|
|
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 8x
|
|
|
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 9x
|
|
|
|
0, 7, 7, 7, 7, 7, 7, 0, 7, 7, 7, 7, 7, 0, 7, 7, // Ax
|
|
|
|
0, 3, 3, 3, 3, 3, 3, 0, 3, 3, 3, 3, 3, 0, 3, 3, // Bx
|
|
|
|
7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, // Cx
|
|
|
|
7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 3, // Dx
|
|
|
|
3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, // Ex
|
|
|
|
3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, // Fx
|
|
|
|
};
|
|
|
|
|
2023-10-31 08:54:52 -04:00
|
|
|
/**
|
|
|
|
* Each element of the following table contains a bitfield that indicates a
|
|
|
|
* piece of information about the corresponding ISO-8859-11 character.
|
|
|
|
*/
|
2023-09-27 12:24:48 -04:00
|
|
|
static uint8_t pm_encoding_iso_8859_11_table[256] = {
|
2023-08-15 10:00:54 -07:00
|
|
|
// 0 1 2 3 4 5 6 7 8 9 A B C D E F
|
|
|
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 0x
|
|
|
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 1x
|
|
|
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 2x
|
|
|
|
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 0, 0, 0, 0, 0, // 3x
|
|
|
|
0, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, // 4x
|
|
|
|
7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 0, 0, 0, 0, 0, // 5x
|
|
|
|
0, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, // 6x
|
|
|
|
3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 0, 0, 0, 0, 0, // 7x
|
|
|
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 8x
|
|
|
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 9x
|
|
|
|
0, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, // Ax
|
|
|
|
3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, // Bx
|
|
|
|
3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, // Cx
|
|
|
|
3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 0, 0, 0, 0, 3, // Dx
|
|
|
|
3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, // Ex
|
|
|
|
3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 0, 0, 0, 0, // Fx
|
|
|
|
};
|
|
|
|
|
2023-10-31 08:54:52 -04:00
|
|
|
/**
|
|
|
|
* Each element of the following table contains a bitfield that indicates a
|
|
|
|
* piece of information about the corresponding ISO-8859-13 character.
|
|
|
|
*/
|
2023-09-27 12:24:48 -04:00
|
|
|
static uint8_t pm_encoding_iso_8859_13_table[256] = {
|
2023-08-15 10:00:54 -07:00
|
|
|
// 0 1 2 3 4 5 6 7 8 9 A B C D E F
|
|
|
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 0x
|
|
|
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 1x
|
|
|
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 2x
|
|
|
|
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 0, 0, 0, 0, 0, // 3x
|
|
|
|
0, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, // 4x
|
|
|
|
7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 0, 0, 0, 0, 0, // 5x
|
|
|
|
0, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, // 6x
|
|
|
|
3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 0, 0, 0, 0, 0, // 7x
|
|
|
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 8x
|
|
|
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 9x
|
|
|
|
0, 0, 0, 0, 0, 0, 0, 0, 7, 0, 7, 0, 0, 0, 0, 7, // Ax
|
|
|
|
0, 0, 0, 0, 0, 3, 0, 0, 3, 0, 3, 0, 0, 0, 0, 3, // Bx
|
|
|
|
7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, // Cx
|
|
|
|
7, 7, 7, 7, 7, 7, 7, 0, 7, 7, 7, 7, 7, 7, 7, 3, // Dx
|
|
|
|
3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, // Ex
|
|
|
|
3, 3, 3, 3, 3, 3, 3, 0, 3, 3, 3, 3, 3, 3, 3, 0, // Fx
|
|
|
|
};
|
|
|
|
|
2023-10-31 08:54:52 -04:00
|
|
|
/**
|
|
|
|
* Each element of the following table contains a bitfield that indicates a
|
|
|
|
* piece of information about the corresponding ISO-8859-14 character.
|
|
|
|
*/
|
2023-09-27 12:24:48 -04:00
|
|
|
static uint8_t pm_encoding_iso_8859_14_table[256] = {
|
2023-08-15 10:00:54 -07:00
|
|
|
// 0 1 2 3 4 5 6 7 8 9 A B C D E F
|
|
|
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 0x
|
|
|
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 1x
|
|
|
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 2x
|
|
|
|
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 0, 0, 0, 0, 0, // 3x
|
|
|
|
0, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, // 4x
|
|
|
|
7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 0, 0, 0, 0, 0, // 5x
|
|
|
|
0, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, // 6x
|
|
|
|
3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 0, 0, 0, 0, 0, // 7x
|
|
|
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 8x
|
|
|
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 9x
|
|
|
|
0, 7, 3, 0, 7, 3, 7, 0, 7, 0, 7, 3, 7, 0, 0, 7, // Ax
|
|
|
|
7, 3, 7, 3, 7, 3, 0, 7, 3, 3, 3, 7, 3, 7, 3, 3, // Bx
|
|
|
|
7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, // Cx
|
|
|
|
7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 3, // Dx
|
|
|
|
3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, // Ex
|
|
|
|
3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, // Fx
|
|
|
|
};
|
|
|
|
|
2023-10-31 08:54:52 -04:00
|
|
|
/**
|
|
|
|
* Each element of the following table contains a bitfield that indicates a
|
|
|
|
* piece of information about the corresponding ISO-8859-15 character.
|
|
|
|
*/
|
2023-09-27 12:24:48 -04:00
|
|
|
static uint8_t pm_encoding_iso_8859_15_table[256] = {
|
2023-08-15 10:00:54 -07:00
|
|
|
// 0 1 2 3 4 5 6 7 8 9 A B C D E F
|
|
|
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 0x
|
|
|
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 1x
|
|
|
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 2x
|
|
|
|
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 0, 0, 0, 0, 0, // 3x
|
|
|
|
0, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, // 4x
|
|
|
|
7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 0, 0, 0, 0, 0, // 5x
|
|
|
|
0, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, // 6x
|
|
|
|
3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 0, 0, 0, 0, 0, // 7x
|
|
|
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 8x
|
|
|
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 9x
|
|
|
|
0, 0, 0, 0, 0, 0, 7, 0, 3, 0, 3, 0, 0, 0, 0, 0, // Ax
|
|
|
|
0, 0, 0, 0, 7, 3, 0, 0, 3, 0, 3, 0, 7, 3, 7, 0, // Bx
|
|
|
|
7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, // Cx
|
|
|
|
7, 7, 7, 7, 7, 7, 7, 0, 7, 7, 7, 7, 7, 7, 7, 3, // Dx
|
|
|
|
3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, // Ex
|
|
|
|
3, 3, 3, 3, 3, 3, 3, 0, 3, 3, 3, 3, 3, 3, 3, 3, // Fx
|
|
|
|
};
|
|
|
|
|
2023-10-31 08:54:52 -04:00
|
|
|
/**
|
|
|
|
* Each element of the following table contains a bitfield that indicates a
|
|
|
|
* piece of information about the corresponding ISO-8859-16 character.
|
|
|
|
*/
|
2023-09-27 12:24:48 -04:00
|
|
|
static uint8_t pm_encoding_iso_8859_16_table[256] = {
|
2023-08-15 10:00:54 -07:00
|
|
|
// 0 1 2 3 4 5 6 7 8 9 A B C D E F
|
|
|
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 0x
|
|
|
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 1x
|
|
|
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 2x
|
|
|
|
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 0, 0, 0, 0, 0, // 3x
|
|
|
|
0, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, // 4x
|
|
|
|
7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 0, 0, 0, 0, 0, // 5x
|
|
|
|
0, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, // 6x
|
|
|
|
3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 0, 0, 0, 0, 0, // 7x
|
|
|
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 8x
|
|
|
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 9x
|
|
|
|
0, 7, 3, 7, 0, 0, 7, 0, 3, 0, 7, 0, 7, 0, 3, 7, // Ax
|
|
|
|
0, 0, 7, 3, 7, 0, 0, 0, 3, 3, 3, 0, 7, 3, 7, 3, // Bx
|
|
|
|
7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, // Cx
|
|
|
|
7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 3, // Dx
|
|
|
|
3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, // Ex
|
|
|
|
3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, // Fx
|
|
|
|
};
|
|
|
|
|
2023-10-31 08:54:52 -04:00
|
|
|
/**
|
|
|
|
* Each element of the following table contains a bitfield that indicates a
|
|
|
|
* piece of information about the corresponding KOI8-R character.
|
|
|
|
*/
|
2023-09-27 12:24:48 -04:00
|
|
|
static uint8_t pm_encoding_koi8_r_table[256] = {
|
2023-08-15 10:00:54 -07:00
|
|
|
// 0 1 2 3 4 5 6 7 8 9 A B C D E F
|
|
|
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 0x
|
|
|
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 1x
|
|
|
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 2x
|
|
|
|
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 0, 0, 0, 0, 0, // 3x
|
|
|
|
0, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, // 4x
|
|
|
|
7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 0, 0, 0, 0, 0, // 5x
|
|
|
|
0, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, // 6x
|
|
|
|
3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 0, 0, 0, 0, 0, // 7x
|
|
|
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 8x
|
|
|
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 9x
|
|
|
|
0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // Ax
|
|
|
|
0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // Bx
|
|
|
|
3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, // Cx
|
|
|
|
3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, // Dx
|
|
|
|
7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, // Ex
|
|
|
|
7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, // Fx
|
|
|
|
};
|
|
|
|
|
2023-11-11 22:52:23 -05:00
|
|
|
/**
|
|
|
|
* Each element of the following table contains a bitfield that indicates a
|
|
|
|
* piece of information about the corresponding windows-1250 character.
|
|
|
|
*/
|
|
|
|
static uint8_t pm_encoding_windows_1250_table[256] = {
|
|
|
|
// 0 1 2 3 4 5 6 7 8 9 A B C D E F
|
|
|
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 0x
|
|
|
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 1x
|
|
|
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 2x
|
|
|
|
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 0, 0, 0, 0, 0, // 3x
|
|
|
|
0, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, // 4x
|
|
|
|
7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 0, 0, 0, 0, 0, // 5x
|
|
|
|
0, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, // 6x
|
|
|
|
3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 0, 0, 0, 0, 0, // 7x
|
|
|
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 0, 7, 7, 7, 7, // 8x
|
|
|
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 3, 3, 3, 3, // 9x
|
|
|
|
0, 0, 0, 7, 0, 7, 0, 0, 0, 0, 7, 0, 0, 0, 0, 7, // Ax
|
|
|
|
0, 0, 0, 3, 0, 3, 0, 0, 0, 3, 3, 0, 7, 0, 3, 3, // Bx
|
|
|
|
7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, // Cx
|
|
|
|
7, 7, 7, 7, 7, 7, 7, 0, 7, 7, 7, 7, 7, 7, 7, 3, // Dx
|
|
|
|
3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, // Ex
|
|
|
|
3, 3, 3, 3, 3, 3, 3, 0, 3, 3, 3, 3, 3, 3, 3, 0, // Fx
|
|
|
|
};
|
|
|
|
|
2023-10-31 08:54:52 -04:00
|
|
|
/**
|
|
|
|
* Each element of the following table contains a bitfield that indicates a
|
|
|
|
* piece of information about the corresponding windows-1251 character.
|
|
|
|
*/
|
2023-09-27 12:24:48 -04:00
|
|
|
static uint8_t pm_encoding_windows_1251_table[256] = {
|
2023-08-15 10:00:54 -07:00
|
|
|
// 0 1 2 3 4 5 6 7 8 9 A B C D E F
|
|
|
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 0x
|
|
|
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 1x
|
|
|
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 2x
|
|
|
|
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 0, 0, 0, 0, 0, // 3x
|
|
|
|
0, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, // 4x
|
|
|
|
7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 0, 0, 0, 0, 0, // 5x
|
|
|
|
0, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, // 6x
|
|
|
|
3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 0, 0, 0, 0, 0, // 7x
|
|
|
|
7, 7, 0, 3, 0, 0, 0, 0, 0, 0, 7, 0, 7, 7, 7, 7, // 8x
|
|
|
|
3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 3, 3, 3, 3, // 9x
|
|
|
|
0, 7, 3, 7, 0, 7, 0, 0, 7, 0, 7, 0, 0, 0, 0, 7, // Ax
|
|
|
|
0, 0, 7, 3, 3, 3, 0, 0, 3, 0, 3, 0, 3, 7, 3, 3, // Bx
|
|
|
|
7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, // Cx
|
|
|
|
7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, // Dx
|
|
|
|
3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, // Ex
|
|
|
|
3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, // Fx
|
|
|
|
};
|
|
|
|
|
2023-10-31 08:54:52 -04:00
|
|
|
/**
|
|
|
|
* Each element of the following table contains a bitfield that indicates a
|
|
|
|
* piece of information about the corresponding windows-1252 character.
|
|
|
|
*/
|
2023-09-27 12:24:48 -04:00
|
|
|
static uint8_t pm_encoding_windows_1252_table[256] = {
|
2023-08-15 10:00:54 -07:00
|
|
|
// 0 1 2 3 4 5 6 7 8 9 A B C D E F
|
|
|
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 0x
|
|
|
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 1x
|
|
|
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 2x
|
|
|
|
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 0, 0, 0, 0, 0, // 3x
|
|
|
|
0, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, // 4x
|
|
|
|
7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 0, 0, 0, 0, 0, // 5x
|
|
|
|
0, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, // 6x
|
|
|
|
3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 0, 0, 0, 0, 0, // 7x
|
|
|
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 0, 7, 0, 7, 0, // 8x
|
|
|
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 3, 0, 3, 7, // 9x
|
|
|
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, // Ax
|
|
|
|
0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, // Bx
|
|
|
|
7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, // Cx
|
|
|
|
7, 7, 7, 7, 7, 7, 7, 0, 7, 7, 7, 7, 7, 7, 7, 3, // Dx
|
|
|
|
3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, // Ex
|
|
|
|
3, 3, 3, 3, 3, 3, 3, 0, 3, 3, 3, 3, 3, 3, 3, 3, // Fx
|
|
|
|
};
|
|
|
|
|
2023-11-11 23:00:18 -05:00
|
|
|
/**
|
|
|
|
* Each element of the following table contains a bitfield that indicates a
|
|
|
|
* piece of information about the corresponding windows-1253 character.
|
|
|
|
*/
|
|
|
|
static uint8_t pm_encoding_windows_1253_table[256] = {
|
|
|
|
// 0 1 2 3 4 5 6 7 8 9 A B C D E F
|
|
|
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 0x
|
|
|
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 1x
|
|
|
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 2x
|
|
|
|
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 0, 0, 0, 0, 0, // 3x
|
|
|
|
0, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, // 4x
|
|
|
|
7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 0, 0, 0, 0, 0, // 5x
|
|
|
|
0, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, // 6x
|
|
|
|
3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 0, 0, 0, 0, 0, // 7x
|
|
|
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 8x
|
|
|
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 9x
|
|
|
|
0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // Ax
|
|
|
|
0, 0, 0, 0, 0, 3, 7, 0, 7, 7, 7, 0, 7, 0, 7, 7, // Bx
|
|
|
|
3, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, // Cx
|
|
|
|
7, 7, 0, 7, 7, 7, 7, 7, 7, 7, 7, 7, 3, 3, 3, 3, // Dx
|
|
|
|
3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, // Ex
|
|
|
|
3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 0, // Fx
|
|
|
|
};
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Each element of the following table contains a bitfield that indicates a
|
|
|
|
* piece of information about the corresponding windows-1254 character.
|
|
|
|
*/
|
|
|
|
static uint8_t pm_encoding_windows_1254_table[256] = {
|
|
|
|
// 0 1 2 3 4 5 6 7 8 9 A B C D E F
|
|
|
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 0x
|
|
|
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 1x
|
|
|
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 2x
|
|
|
|
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 0, 0, 0, 0, 0, // 3x
|
|
|
|
0, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, // 4x
|
|
|
|
7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 0, 0, 0, 0, 0, // 5x
|
|
|
|
0, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, // 6x
|
|
|
|
3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 0, 0, 0, 0, 0, // 7x
|
|
|
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 0, 7, 0, 0, 0, // 8x
|
|
|
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 3, 0, 0, 7, // 9x
|
|
|
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, // Ax
|
|
|
|
0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, // Bx
|
|
|
|
7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, // Cx
|
|
|
|
7, 7, 7, 7, 7, 7, 7, 0, 7, 7, 7, 7, 7, 7, 7, 3, // Dx
|
|
|
|
3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, // Ex
|
|
|
|
3, 3, 3, 3, 3, 3, 3, 0, 3, 3, 3, 3, 3, 3, 3, 3, // Fx
|
|
|
|
};
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Each element of the following table contains a bitfield that indicates a
|
|
|
|
* piece of information about the corresponding windows-1255 character.
|
|
|
|
*/
|
|
|
|
static uint8_t pm_encoding_windows_1255_table[256] = {
|
|
|
|
// 0 1 2 3 4 5 6 7 8 9 A B C D E F
|
|
|
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 0x
|
|
|
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 1x
|
|
|
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 2x
|
|
|
|
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 0, 0, 0, 0, 0, // 3x
|
|
|
|
0, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, // 4x
|
|
|
|
7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 0, 0, 0, 0, 0, // 5x
|
|
|
|
0, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, // 6x
|
|
|
|
3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 0, 0, 0, 0, 0, // 7x
|
|
|
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 8x
|
|
|
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 9x
|
|
|
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // Ax
|
|
|
|
0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // Bx
|
|
|
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // Cx
|
|
|
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // Dx
|
|
|
|
3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, // Ex
|
|
|
|
3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 0, 0, 0, 0, 0, // Fx
|
|
|
|
};
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Each element of the following table contains a bitfield that indicates a
|
|
|
|
* piece of information about the corresponding windows-1256 character.
|
|
|
|
*/
|
|
|
|
static uint8_t pm_encoding_windows_1256_table[256] = {
|
|
|
|
// 0 1 2 3 4 5 6 7 8 9 A B C D E F
|
|
|
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 0x
|
|
|
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 1x
|
|
|
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 2x
|
|
|
|
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 0, 0, 0, 0, 0, // 3x
|
|
|
|
0, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, // 4x
|
|
|
|
7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 0, 0, 0, 0, 0, // 5x
|
|
|
|
0, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, // 6x
|
|
|
|
3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 0, 0, 0, 0, 0, // 7x
|
|
|
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 8x
|
|
|
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 9x
|
|
|
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // Ax
|
|
|
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // Bx
|
|
|
|
0, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, // Cx
|
|
|
|
3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 0, 0, 0, 0, 0, // Dx
|
|
|
|
3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, // Ex
|
|
|
|
3, 3, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // Fx
|
|
|
|
};
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Each element of the following table contains a bitfield that indicates a
|
|
|
|
* piece of information about the corresponding windows-1257 character.
|
|
|
|
*/
|
|
|
|
static uint8_t pm_encoding_windows_1257_table[256] = {
|
|
|
|
// 0 1 2 3 4 5 6 7 8 9 A B C D E F
|
|
|
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 0x
|
|
|
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 1x
|
|
|
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 2x
|
|
|
|
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 0, 0, 0, 0, 0, // 3x
|
|
|
|
0, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, // 4x
|
|
|
|
7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 0, 0, 0, 0, 0, // 5x
|
|
|
|
0, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, // 6x
|
|
|
|
3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 0, 0, 0, 0, 0, // 7x
|
|
|
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 8x
|
|
|
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 9x
|
|
|
|
0, 0, 0, 0, 0, 0, 0, 0, 7, 0, 7, 0, 0, 0, 0, 7, // Ax
|
|
|
|
0, 0, 0, 0, 0, 3, 0, 0, 3, 0, 3, 0, 0, 0, 0, 3, // Bx
|
|
|
|
7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, // Cx
|
|
|
|
7, 7, 7, 7, 7, 7, 7, 0, 7, 7, 7, 7, 7, 7, 7, 3, // Dx
|
|
|
|
3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, // Ex
|
|
|
|
3, 3, 3, 3, 3, 3, 3, 0, 3, 3, 3, 3, 3, 3, 3, 0, // Fx
|
|
|
|
};
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Each element of the following table contains a bitfield that indicates a
|
|
|
|
* piece of information about the corresponding windows-1258 character.
|
|
|
|
*/
|
|
|
|
static uint8_t pm_encoding_windows_1258_table[256] = {
|
|
|
|
// 0 1 2 3 4 5 6 7 8 9 A B C D E F
|
|
|
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 0x
|
|
|
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 1x
|
|
|
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 2x
|
|
|
|
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 0, 0, 0, 0, 0, // 3x
|
|
|
|
0, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, // 4x
|
|
|
|
7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 0, 0, 0, 0, 0, // 5x
|
|
|
|
0, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, // 6x
|
|
|
|
3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 0, 0, 0, 0, 0, // 7x
|
|
|
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 8x
|
|
|
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 9x
|
|
|
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // Ax
|
|
|
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // Bx
|
|
|
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // Cx
|
|
|
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // Dx
|
|
|
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // Ex
|
|
|
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // Fx
|
|
|
|
};
|
|
|
|
|
2023-10-31 08:54:52 -04:00
|
|
|
/**
|
|
|
|
* Returns the size of the next character in the ASCII encoding. This basically
|
|
|
|
* means that if the top bit is not set, the character is 1 byte long.
|
|
|
|
*/
|
2023-08-15 10:00:54 -07:00
|
|
|
static size_t
|
2023-09-27 12:24:48 -04:00
|
|
|
pm_encoding_ascii_char_width(const uint8_t *b, PRISM_ATTRIBUTE_UNUSED ptrdiff_t n) {
|
2023-08-29 10:48:20 -04:00
|
|
|
return *b < 0x80 ? 1 : 0;
|
2023-08-15 10:00:54 -07:00
|
|
|
}
|
|
|
|
|
2023-10-31 08:54:52 -04:00
|
|
|
/**
|
|
|
|
* Return the size of the next character in the ASCII encoding if it is an
|
|
|
|
* alphabetical character.
|
|
|
|
*/
|
2023-08-15 10:00:54 -07:00
|
|
|
size_t
|
2023-09-27 12:24:48 -04:00
|
|
|
pm_encoding_ascii_alpha_char(const uint8_t *b, PRISM_ATTRIBUTE_UNUSED ptrdiff_t n) {
|
|
|
|
return (pm_encoding_ascii_table[*b] & PRISM_ENCODING_ALPHABETIC_BIT);
|
2023-08-15 10:00:54 -07:00
|
|
|
}
|
|
|
|
|
2023-10-31 08:54:52 -04:00
|
|
|
/**
|
|
|
|
* Return the size of the next character in the ASCII encoding if it is an
|
|
|
|
* alphanumeric character.
|
|
|
|
*/
|
2023-08-15 10:00:54 -07:00
|
|
|
size_t
|
2023-09-27 12:24:48 -04:00
|
|
|
pm_encoding_ascii_alnum_char(const uint8_t *b, PRISM_ATTRIBUTE_UNUSED ptrdiff_t n) {
|
|
|
|
return (pm_encoding_ascii_table[*b] & PRISM_ENCODING_ALPHANUMERIC_BIT) ? 1 : 0;
|
2023-08-15 10:00:54 -07:00
|
|
|
}
|
|
|
|
|
2023-10-31 08:54:52 -04:00
|
|
|
/**
|
|
|
|
* Return true if the next character in the ASCII encoding if it is an uppercase
|
|
|
|
* character.
|
|
|
|
*/
|
2023-08-15 10:00:54 -07:00
|
|
|
bool
|
2023-09-27 12:24:48 -04:00
|
|
|
pm_encoding_ascii_isupper_char(const uint8_t *b, PRISM_ATTRIBUTE_UNUSED ptrdiff_t n) {
|
|
|
|
return (pm_encoding_ascii_table[*b] & PRISM_ENCODING_UPPERCASE_BIT);
|
2023-08-15 10:00:54 -07:00
|
|
|
}
|
|
|
|
|
2023-10-31 08:54:52 -04:00
|
|
|
/**
|
|
|
|
* For a lot of encodings the default is that they are a single byte long no
|
|
|
|
* matter what the codepoint, so this function is shared between them.
|
|
|
|
*/
|
2023-08-15 10:00:54 -07:00
|
|
|
static size_t
|
2023-10-31 08:54:52 -04:00
|
|
|
pm_encoding_single_char_width(PRISM_ATTRIBUTE_UNUSED const uint8_t *b, PRISM_ATTRIBUTE_UNUSED ptrdiff_t n) {
|
|
|
|
return 1;
|
2023-08-15 10:00:54 -07:00
|
|
|
}
|
|
|
|
|
2023-10-31 08:54:52 -04:00
|
|
|
/**
|
|
|
|
* Returns the size of the next character in the KOI-8 encoding. This means
|
|
|
|
* checking if it's a valid codepoint in KOI-8 and if it is returning 1.
|
|
|
|
*/
|
2023-08-15 10:00:54 -07:00
|
|
|
static size_t
|
2023-10-31 08:54:52 -04:00
|
|
|
pm_encoding_koi8_r_char_width(const uint8_t *b, PRISM_ATTRIBUTE_UNUSED ptrdiff_t n) {
|
|
|
|
return ((*b >= 0x20 && *b <= 0x7E) || (*b >= 0x80)) ? 1 : 0;
|
2023-08-15 10:00:54 -07:00
|
|
|
}
|
|
|
|
|
2023-10-31 08:54:52 -04:00
|
|
|
#define PRISM_ENCODING_TABLE(name) \
|
|
|
|
static size_t pm_encoding_ ##name ## _alpha_char(const uint8_t *b, PRISM_ATTRIBUTE_UNUSED ptrdiff_t n) { \
|
|
|
|
return (pm_encoding_ ##name ## _table[*b] & PRISM_ENCODING_ALPHABETIC_BIT); \
|
|
|
|
} \
|
|
|
|
static size_t pm_encoding_ ##name ## _alnum_char(const uint8_t *b, PRISM_ATTRIBUTE_UNUSED ptrdiff_t n) { \
|
|
|
|
return (pm_encoding_ ##name ## _table[*b] & PRISM_ENCODING_ALPHANUMERIC_BIT) ? 1 : 0; \
|
|
|
|
} \
|
|
|
|
static bool pm_encoding_ ##name ## _isupper_char(const uint8_t *b, PRISM_ATTRIBUTE_UNUSED ptrdiff_t n) { \
|
|
|
|
return (pm_encoding_ ##name ## _table[*b] & PRISM_ENCODING_UPPERCASE_BIT); \
|
|
|
|
}
|
|
|
|
|
2023-11-11 23:11:44 -05:00
|
|
|
PRISM_ENCODING_TABLE(cp850)
|
|
|
|
PRISM_ENCODING_TABLE(cp852)
|
2023-11-11 23:15:58 -05:00
|
|
|
PRISM_ENCODING_TABLE(cp855)
|
2023-11-11 23:41:53 -05:00
|
|
|
PRISM_ENCODING_TABLE(ibm437)
|
2023-11-11 23:44:31 -05:00
|
|
|
PRISM_ENCODING_TABLE(ibm720)
|
2023-11-11 23:48:15 -05:00
|
|
|
PRISM_ENCODING_TABLE(ibm737)
|
2023-11-11 23:50:23 -05:00
|
|
|
PRISM_ENCODING_TABLE(ibm775)
|
2023-11-12 00:07:06 -05:00
|
|
|
PRISM_ENCODING_TABLE(ibm852)
|
2023-11-12 00:09:10 -05:00
|
|
|
PRISM_ENCODING_TABLE(ibm855)
|
2023-11-12 00:11:14 -05:00
|
|
|
PRISM_ENCODING_TABLE(ibm857)
|
2023-11-12 00:13:15 -05:00
|
|
|
PRISM_ENCODING_TABLE(ibm860)
|
2023-11-12 00:15:24 -05:00
|
|
|
PRISM_ENCODING_TABLE(ibm861)
|
2023-10-31 08:54:52 -04:00
|
|
|
PRISM_ENCODING_TABLE(iso_8859_1)
|
|
|
|
PRISM_ENCODING_TABLE(iso_8859_2)
|
|
|
|
PRISM_ENCODING_TABLE(iso_8859_3)
|
|
|
|
PRISM_ENCODING_TABLE(iso_8859_4)
|
|
|
|
PRISM_ENCODING_TABLE(iso_8859_5)
|
|
|
|
PRISM_ENCODING_TABLE(iso_8859_6)
|
|
|
|
PRISM_ENCODING_TABLE(iso_8859_7)
|
|
|
|
PRISM_ENCODING_TABLE(iso_8859_8)
|
|
|
|
PRISM_ENCODING_TABLE(iso_8859_9)
|
|
|
|
PRISM_ENCODING_TABLE(iso_8859_10)
|
|
|
|
PRISM_ENCODING_TABLE(iso_8859_11)
|
|
|
|
PRISM_ENCODING_TABLE(iso_8859_13)
|
|
|
|
PRISM_ENCODING_TABLE(iso_8859_14)
|
|
|
|
PRISM_ENCODING_TABLE(iso_8859_15)
|
|
|
|
PRISM_ENCODING_TABLE(iso_8859_16)
|
|
|
|
PRISM_ENCODING_TABLE(koi8_r)
|
2023-11-11 22:52:23 -05:00
|
|
|
PRISM_ENCODING_TABLE(windows_1250)
|
2023-10-31 08:54:52 -04:00
|
|
|
PRISM_ENCODING_TABLE(windows_1251)
|
|
|
|
PRISM_ENCODING_TABLE(windows_1252)
|
2023-11-11 23:00:18 -05:00
|
|
|
PRISM_ENCODING_TABLE(windows_1253)
|
|
|
|
PRISM_ENCODING_TABLE(windows_1254)
|
|
|
|
PRISM_ENCODING_TABLE(windows_1255)
|
|
|
|
PRISM_ENCODING_TABLE(windows_1256)
|
|
|
|
PRISM_ENCODING_TABLE(windows_1257)
|
|
|
|
PRISM_ENCODING_TABLE(windows_1258)
|
2023-10-31 08:54:52 -04:00
|
|
|
|
|
|
|
#undef PRISM_ENCODING_TABLE
|
|
|
|
|
2023-11-11 23:11:44 -05:00
|
|
|
/** US-ASCII encoding */
|
2023-10-31 15:40:50 -04:00
|
|
|
pm_encoding_t pm_encoding_ascii = {
|
2023-11-11 23:11:44 -05:00
|
|
|
.name = "US-ASCII",
|
2023-09-27 12:24:48 -04:00
|
|
|
.char_width = pm_encoding_ascii_char_width,
|
|
|
|
.alnum_char = pm_encoding_ascii_alnum_char,
|
|
|
|
.alpha_char = pm_encoding_ascii_alpha_char,
|
|
|
|
.isupper_char = pm_encoding_ascii_isupper_char,
|
2023-08-15 10:00:54 -07:00
|
|
|
.multibyte = false
|
|
|
|
};
|
|
|
|
|
2023-10-31 08:54:52 -04:00
|
|
|
/** ASCII-8BIT encoding */
|
2023-10-31 15:40:50 -04:00
|
|
|
pm_encoding_t pm_encoding_ascii_8bit = {
|
2023-11-11 23:11:44 -05:00
|
|
|
.name = "ASCII-8BIT",
|
2023-09-27 12:24:48 -04:00
|
|
|
.char_width = pm_encoding_single_char_width,
|
|
|
|
.alnum_char = pm_encoding_ascii_alnum_char,
|
|
|
|
.alpha_char = pm_encoding_ascii_alpha_char,
|
|
|
|
.isupper_char = pm_encoding_ascii_isupper_char,
|
2023-08-15 10:00:54 -07:00
|
|
|
.multibyte = false
|
|
|
|
};
|
|
|
|
|
2023-11-11 23:11:44 -05:00
|
|
|
/** CP850 */
|
|
|
|
pm_encoding_t pm_encoding_cp850 = {
|
|
|
|
.name = "CP850",
|
|
|
|
.char_width = pm_encoding_single_char_width,
|
|
|
|
.alnum_char = pm_encoding_cp850_alnum_char,
|
|
|
|
.alpha_char = pm_encoding_cp850_alpha_char,
|
|
|
|
.isupper_char = pm_encoding_cp850_isupper_char,
|
|
|
|
.multibyte = false
|
|
|
|
};
|
|
|
|
|
|
|
|
/** CP852 */
|
|
|
|
pm_encoding_t pm_encoding_cp852 = {
|
|
|
|
.name = "CP852",
|
|
|
|
.char_width = pm_encoding_single_char_width,
|
|
|
|
.alnum_char = pm_encoding_cp852_alnum_char,
|
|
|
|
.alpha_char = pm_encoding_cp852_alpha_char,
|
|
|
|
.isupper_char = pm_encoding_cp852_isupper_char,
|
|
|
|
.multibyte = false
|
|
|
|
};
|
|
|
|
|
2023-11-11 23:15:58 -05:00
|
|
|
/** CP855 */
|
|
|
|
pm_encoding_t pm_encoding_cp855 = {
|
|
|
|
.name = "CP855",
|
|
|
|
.char_width = pm_encoding_single_char_width,
|
|
|
|
.alnum_char = pm_encoding_cp855_alnum_char,
|
|
|
|
.alpha_char = pm_encoding_cp855_alpha_char,
|
|
|
|
.isupper_char = pm_encoding_cp855_isupper_char,
|
|
|
|
.multibyte = false
|
|
|
|
};
|
|
|
|
|
2023-11-11 23:41:53 -05:00
|
|
|
/** IBM437 */
|
|
|
|
pm_encoding_t pm_encoding_ibm437 = {
|
|
|
|
.name = "IBM437",
|
|
|
|
.char_width = pm_encoding_single_char_width,
|
|
|
|
.alnum_char = pm_encoding_ibm437_alnum_char,
|
|
|
|
.alpha_char = pm_encoding_ibm437_alpha_char,
|
|
|
|
.isupper_char = pm_encoding_ibm437_isupper_char,
|
|
|
|
.multibyte = false
|
|
|
|
};
|
|
|
|
|
2023-11-11 23:44:31 -05:00
|
|
|
/** IBM720 */
|
|
|
|
pm_encoding_t pm_encoding_ibm720 = {
|
|
|
|
.name = "IBM720",
|
|
|
|
.char_width = pm_encoding_single_char_width,
|
|
|
|
.alnum_char = pm_encoding_ibm720_alnum_char,
|
|
|
|
.alpha_char = pm_encoding_ibm720_alpha_char,
|
|
|
|
.isupper_char = pm_encoding_ibm720_isupper_char,
|
|
|
|
.multibyte = false
|
|
|
|
};
|
|
|
|
|
2023-11-11 23:48:15 -05:00
|
|
|
/** IBM737 */
|
|
|
|
pm_encoding_t pm_encoding_ibm737 = {
|
|
|
|
.name = "IBM737",
|
|
|
|
.char_width = pm_encoding_single_char_width,
|
|
|
|
.alnum_char = pm_encoding_ibm737_alnum_char,
|
|
|
|
.alpha_char = pm_encoding_ibm737_alpha_char,
|
|
|
|
.isupper_char = pm_encoding_ibm737_isupper_char,
|
|
|
|
.multibyte = false
|
|
|
|
};
|
|
|
|
|
2023-11-11 23:50:23 -05:00
|
|
|
/** IBM775 */
|
|
|
|
pm_encoding_t pm_encoding_ibm775 = {
|
|
|
|
.name = "IBM775",
|
|
|
|
.char_width = pm_encoding_single_char_width,
|
|
|
|
.alnum_char = pm_encoding_ibm775_alnum_char,
|
|
|
|
.alpha_char = pm_encoding_ibm775_alpha_char,
|
|
|
|
.isupper_char = pm_encoding_ibm775_isupper_char,
|
|
|
|
.multibyte = false
|
|
|
|
};
|
|
|
|
|
2023-11-12 00:07:06 -05:00
|
|
|
/** IBM850 */
|
|
|
|
pm_encoding_t pm_encoding_ibm852 = {
|
|
|
|
.name = "IBM852",
|
|
|
|
.char_width = pm_encoding_single_char_width,
|
|
|
|
.alnum_char = pm_encoding_ibm852_alnum_char,
|
|
|
|
.alpha_char = pm_encoding_ibm852_alpha_char,
|
|
|
|
.isupper_char = pm_encoding_ibm852_isupper_char,
|
|
|
|
.multibyte = false
|
|
|
|
};
|
|
|
|
|
2023-11-12 00:09:10 -05:00
|
|
|
/** IBM855 */
|
|
|
|
pm_encoding_t pm_encoding_ibm855 = {
|
|
|
|
.name = "IBM855",
|
|
|
|
.char_width = pm_encoding_single_char_width,
|
|
|
|
.alnum_char = pm_encoding_ibm855_alnum_char,
|
|
|
|
.alpha_char = pm_encoding_ibm855_alpha_char,
|
|
|
|
.isupper_char = pm_encoding_ibm855_isupper_char,
|
|
|
|
.multibyte = false
|
|
|
|
};
|
|
|
|
|
2023-11-12 00:11:14 -05:00
|
|
|
/** IBM857 */
|
|
|
|
pm_encoding_t pm_encoding_ibm857 = {
|
|
|
|
.name = "IBM857",
|
|
|
|
.char_width = pm_encoding_single_char_width,
|
|
|
|
.alnum_char = pm_encoding_ibm857_alnum_char,
|
|
|
|
.alpha_char = pm_encoding_ibm857_alpha_char,
|
|
|
|
.isupper_char = pm_encoding_ibm857_isupper_char,
|
|
|
|
.multibyte = false
|
|
|
|
};
|
|
|
|
|
2023-11-12 00:13:15 -05:00
|
|
|
/** IBM860 */
|
|
|
|
pm_encoding_t pm_encoding_ibm860 = {
|
|
|
|
.name = "IBM860",
|
|
|
|
.char_width = pm_encoding_single_char_width,
|
|
|
|
.alnum_char = pm_encoding_ibm860_alnum_char,
|
|
|
|
.alpha_char = pm_encoding_ibm860_alpha_char,
|
|
|
|
.isupper_char = pm_encoding_ibm860_isupper_char,
|
|
|
|
.multibyte = false
|
|
|
|
};
|
|
|
|
|
2023-11-12 00:15:24 -05:00
|
|
|
/** IBM861 */
|
|
|
|
pm_encoding_t pm_encoding_ibm861 = {
|
|
|
|
.name = "IBM861",
|
|
|
|
.char_width = pm_encoding_single_char_width,
|
|
|
|
.alnum_char = pm_encoding_ibm861_alnum_char,
|
|
|
|
.alpha_char = pm_encoding_ibm861_alpha_char,
|
|
|
|
.isupper_char = pm_encoding_ibm861_isupper_char,
|
|
|
|
.multibyte = false
|
|
|
|
};
|
|
|
|
|
2023-10-31 08:54:52 -04:00
|
|
|
/** ISO-8859-1 */
|
2023-10-31 15:40:50 -04:00
|
|
|
pm_encoding_t pm_encoding_iso_8859_1 = {
|
2023-11-11 23:11:44 -05:00
|
|
|
.name = "ISO-8859-1",
|
2023-10-31 08:54:52 -04:00
|
|
|
.char_width = pm_encoding_single_char_width,
|
|
|
|
.alnum_char = pm_encoding_iso_8859_1_alnum_char,
|
|
|
|
.alpha_char = pm_encoding_iso_8859_1_alpha_char,
|
|
|
|
.isupper_char = pm_encoding_iso_8859_1_isupper_char,
|
|
|
|
.multibyte = false
|
|
|
|
};
|
2023-08-15 10:00:54 -07:00
|
|
|
|
2023-10-31 08:54:52 -04:00
|
|
|
/** ISO-8859-2 */
|
2023-10-31 15:40:50 -04:00
|
|
|
pm_encoding_t pm_encoding_iso_8859_2 = {
|
2023-11-11 23:11:44 -05:00
|
|
|
.name = "ISO-8859-2",
|
2023-10-31 08:54:52 -04:00
|
|
|
.char_width = pm_encoding_single_char_width,
|
|
|
|
.alnum_char = pm_encoding_iso_8859_2_alnum_char,
|
|
|
|
.alpha_char = pm_encoding_iso_8859_2_alpha_char,
|
|
|
|
.isupper_char = pm_encoding_iso_8859_2_isupper_char,
|
|
|
|
.multibyte = false
|
|
|
|
};
|
|
|
|
|
|
|
|
/** ISO-8859-3 */
|
2023-10-31 15:40:50 -04:00
|
|
|
pm_encoding_t pm_encoding_iso_8859_3 = {
|
2023-11-11 23:11:44 -05:00
|
|
|
.name = "ISO-8859-3",
|
2023-10-31 08:54:52 -04:00
|
|
|
.char_width = pm_encoding_single_char_width,
|
|
|
|
.alnum_char = pm_encoding_iso_8859_3_alnum_char,
|
|
|
|
.alpha_char = pm_encoding_iso_8859_3_alpha_char,
|
|
|
|
.isupper_char = pm_encoding_iso_8859_3_isupper_char,
|
|
|
|
.multibyte = false
|
|
|
|
};
|
|
|
|
|
|
|
|
/** ISO-8859-4 */
|
2023-10-31 15:40:50 -04:00
|
|
|
pm_encoding_t pm_encoding_iso_8859_4 = {
|
2023-11-11 23:11:44 -05:00
|
|
|
.name = "ISO-8859-4",
|
2023-10-31 08:54:52 -04:00
|
|
|
.char_width = pm_encoding_single_char_width,
|
|
|
|
.alnum_char = pm_encoding_iso_8859_4_alnum_char,
|
|
|
|
.alpha_char = pm_encoding_iso_8859_4_alpha_char,
|
|
|
|
.isupper_char = pm_encoding_iso_8859_4_isupper_char,
|
|
|
|
.multibyte = false
|
|
|
|
};
|
|
|
|
|
|
|
|
/** ISO-8859-5 */
|
2023-10-31 15:40:50 -04:00
|
|
|
pm_encoding_t pm_encoding_iso_8859_5 = {
|
2023-11-11 23:11:44 -05:00
|
|
|
.name = "ISO-8859-5",
|
2023-10-31 08:54:52 -04:00
|
|
|
.char_width = pm_encoding_single_char_width,
|
|
|
|
.alnum_char = pm_encoding_iso_8859_5_alnum_char,
|
|
|
|
.alpha_char = pm_encoding_iso_8859_5_alpha_char,
|
|
|
|
.isupper_char = pm_encoding_iso_8859_5_isupper_char,
|
|
|
|
.multibyte = false
|
|
|
|
};
|
|
|
|
|
|
|
|
/** ISO-8859-6 */
|
2023-10-31 15:40:50 -04:00
|
|
|
pm_encoding_t pm_encoding_iso_8859_6 = {
|
2023-11-11 23:11:44 -05:00
|
|
|
.name = "ISO-8859-6",
|
2023-10-31 08:54:52 -04:00
|
|
|
.char_width = pm_encoding_single_char_width,
|
|
|
|
.alnum_char = pm_encoding_iso_8859_6_alnum_char,
|
|
|
|
.alpha_char = pm_encoding_iso_8859_6_alpha_char,
|
|
|
|
.isupper_char = pm_encoding_iso_8859_6_isupper_char,
|
|
|
|
.multibyte = false
|
|
|
|
};
|
|
|
|
|
|
|
|
/** ISO-8859-7 */
|
2023-10-31 15:40:50 -04:00
|
|
|
pm_encoding_t pm_encoding_iso_8859_7 = {
|
2023-11-11 23:11:44 -05:00
|
|
|
.name = "ISO-8859-7",
|
2023-10-31 08:54:52 -04:00
|
|
|
.char_width = pm_encoding_single_char_width,
|
|
|
|
.alnum_char = pm_encoding_iso_8859_7_alnum_char,
|
|
|
|
.alpha_char = pm_encoding_iso_8859_7_alpha_char,
|
|
|
|
.isupper_char = pm_encoding_iso_8859_7_isupper_char,
|
|
|
|
.multibyte = false
|
|
|
|
};
|
|
|
|
|
|
|
|
/** ISO-8859-8 */
|
2023-10-31 15:40:50 -04:00
|
|
|
pm_encoding_t pm_encoding_iso_8859_8 = {
|
2023-11-11 23:11:44 -05:00
|
|
|
.name = "ISO-8859-8",
|
2023-10-31 08:54:52 -04:00
|
|
|
.char_width = pm_encoding_single_char_width,
|
|
|
|
.alnum_char = pm_encoding_iso_8859_8_alnum_char,
|
|
|
|
.alpha_char = pm_encoding_iso_8859_8_alpha_char,
|
|
|
|
.isupper_char = pm_encoding_iso_8859_8_isupper_char,
|
|
|
|
.multibyte = false
|
|
|
|
};
|
|
|
|
|
|
|
|
/** ISO-8859-9 */
|
2023-10-31 15:40:50 -04:00
|
|
|
pm_encoding_t pm_encoding_iso_8859_9 = {
|
2023-11-11 23:11:44 -05:00
|
|
|
.name = "ISO-8859-9",
|
2023-10-31 08:54:52 -04:00
|
|
|
.char_width = pm_encoding_single_char_width,
|
|
|
|
.alnum_char = pm_encoding_iso_8859_9_alnum_char,
|
|
|
|
.alpha_char = pm_encoding_iso_8859_9_alpha_char,
|
|
|
|
.isupper_char = pm_encoding_iso_8859_9_isupper_char,
|
|
|
|
.multibyte = false
|
|
|
|
};
|
|
|
|
|
|
|
|
/** ISO-8859-10 */
|
2023-10-31 15:40:50 -04:00
|
|
|
pm_encoding_t pm_encoding_iso_8859_10 = {
|
2023-11-11 23:11:44 -05:00
|
|
|
.name = "ISO-8859-10",
|
2023-10-31 08:54:52 -04:00
|
|
|
.char_width = pm_encoding_single_char_width,
|
|
|
|
.alnum_char = pm_encoding_iso_8859_10_alnum_char,
|
|
|
|
.alpha_char = pm_encoding_iso_8859_10_alpha_char,
|
|
|
|
.isupper_char = pm_encoding_iso_8859_10_isupper_char,
|
|
|
|
.multibyte = false
|
|
|
|
};
|
|
|
|
|
|
|
|
/** ISO-8859-11 */
|
2023-10-31 15:40:50 -04:00
|
|
|
pm_encoding_t pm_encoding_iso_8859_11 = {
|
2023-11-11 23:11:44 -05:00
|
|
|
.name = "ISO-8859-11",
|
2023-10-31 08:54:52 -04:00
|
|
|
.char_width = pm_encoding_single_char_width,
|
|
|
|
.alnum_char = pm_encoding_iso_8859_11_alnum_char,
|
|
|
|
.alpha_char = pm_encoding_iso_8859_11_alpha_char,
|
|
|
|
.isupper_char = pm_encoding_iso_8859_11_isupper_char,
|
|
|
|
.multibyte = false
|
|
|
|
};
|
|
|
|
|
|
|
|
/** ISO-8859-13 */
|
2023-10-31 15:40:50 -04:00
|
|
|
pm_encoding_t pm_encoding_iso_8859_13 = {
|
2023-11-11 23:11:44 -05:00
|
|
|
.name = "ISO-8859-13",
|
2023-10-31 08:54:52 -04:00
|
|
|
.char_width = pm_encoding_single_char_width,
|
|
|
|
.alnum_char = pm_encoding_iso_8859_13_alnum_char,
|
|
|
|
.alpha_char = pm_encoding_iso_8859_13_alpha_char,
|
|
|
|
.isupper_char = pm_encoding_iso_8859_13_isupper_char,
|
|
|
|
.multibyte = false
|
|
|
|
};
|
|
|
|
|
|
|
|
/** ISO-8859-14 */
|
2023-10-31 15:40:50 -04:00
|
|
|
pm_encoding_t pm_encoding_iso_8859_14 = {
|
2023-11-11 23:11:44 -05:00
|
|
|
.name = "ISO-8859-14",
|
2023-10-31 08:54:52 -04:00
|
|
|
.char_width = pm_encoding_single_char_width,
|
|
|
|
.alnum_char = pm_encoding_iso_8859_14_alnum_char,
|
|
|
|
.alpha_char = pm_encoding_iso_8859_14_alpha_char,
|
|
|
|
.isupper_char = pm_encoding_iso_8859_14_isupper_char,
|
|
|
|
.multibyte = false
|
|
|
|
};
|
|
|
|
|
|
|
|
/** ISO-8859-15 */
|
2023-10-31 15:40:50 -04:00
|
|
|
pm_encoding_t pm_encoding_iso_8859_15 = {
|
2023-11-11 23:11:44 -05:00
|
|
|
.name = "ISO-8859-15",
|
2023-10-31 08:54:52 -04:00
|
|
|
.char_width = pm_encoding_single_char_width,
|
|
|
|
.alnum_char = pm_encoding_iso_8859_15_alnum_char,
|
|
|
|
.alpha_char = pm_encoding_iso_8859_15_alpha_char,
|
|
|
|
.isupper_char = pm_encoding_iso_8859_15_isupper_char,
|
|
|
|
.multibyte = false
|
|
|
|
};
|
|
|
|
|
|
|
|
/** ISO-8859-16 */
|
2023-10-31 15:40:50 -04:00
|
|
|
pm_encoding_t pm_encoding_iso_8859_16 = {
|
2023-11-11 23:11:44 -05:00
|
|
|
.name = "ISO-8859-16",
|
2023-10-31 08:54:52 -04:00
|
|
|
.char_width = pm_encoding_single_char_width,
|
|
|
|
.alnum_char = pm_encoding_iso_8859_16_alnum_char,
|
|
|
|
.alpha_char = pm_encoding_iso_8859_16_alpha_char,
|
|
|
|
.isupper_char = pm_encoding_iso_8859_16_isupper_char,
|
|
|
|
.multibyte = false
|
|
|
|
};
|
|
|
|
|
|
|
|
/** KOI8-R */
|
2023-10-31 15:40:50 -04:00
|
|
|
pm_encoding_t pm_encoding_koi8_r = {
|
2023-11-11 23:11:44 -05:00
|
|
|
.name = "KOI8-R",
|
2023-10-31 08:54:52 -04:00
|
|
|
.char_width = pm_encoding_koi8_r_char_width,
|
|
|
|
.alnum_char = pm_encoding_koi8_r_alnum_char,
|
|
|
|
.alpha_char = pm_encoding_koi8_r_alpha_char,
|
|
|
|
.isupper_char = pm_encoding_koi8_r_isupper_char,
|
|
|
|
.multibyte = false
|
|
|
|
};
|
|
|
|
|
2023-11-11 22:52:23 -05:00
|
|
|
/** Windows-1250 */
|
|
|
|
pm_encoding_t pm_encoding_windows_1250 = {
|
2023-11-11 23:11:44 -05:00
|
|
|
.name = "Windows-1250",
|
2023-11-11 22:52:23 -05:00
|
|
|
.char_width = pm_encoding_single_char_width,
|
|
|
|
.alnum_char = pm_encoding_windows_1250_alnum_char,
|
|
|
|
.alpha_char = pm_encoding_windows_1250_alpha_char,
|
|
|
|
.isupper_char = pm_encoding_windows_1250_isupper_char,
|
|
|
|
.multibyte = false
|
|
|
|
};
|
|
|
|
|
2023-10-31 08:54:52 -04:00
|
|
|
/** Windows-1251 */
|
2023-10-31 15:40:50 -04:00
|
|
|
pm_encoding_t pm_encoding_windows_1251 = {
|
2023-11-11 23:11:44 -05:00
|
|
|
.name = "Windows-1251",
|
2023-10-31 08:54:52 -04:00
|
|
|
.char_width = pm_encoding_single_char_width,
|
|
|
|
.alnum_char = pm_encoding_windows_1251_alnum_char,
|
|
|
|
.alpha_char = pm_encoding_windows_1251_alpha_char,
|
|
|
|
.isupper_char = pm_encoding_windows_1251_isupper_char,
|
|
|
|
.multibyte = false
|
|
|
|
};
|
|
|
|
|
|
|
|
/** Windows-1252 */
|
2023-10-31 15:40:50 -04:00
|
|
|
pm_encoding_t pm_encoding_windows_1252 = {
|
2023-11-11 23:11:44 -05:00
|
|
|
.name = "Windows-1252",
|
2023-10-31 08:54:52 -04:00
|
|
|
.char_width = pm_encoding_single_char_width,
|
|
|
|
.alnum_char = pm_encoding_windows_1252_alnum_char,
|
|
|
|
.alpha_char = pm_encoding_windows_1252_alpha_char,
|
|
|
|
.isupper_char = pm_encoding_windows_1252_isupper_char,
|
|
|
|
.multibyte = false
|
|
|
|
};
|
2023-11-11 23:00:18 -05:00
|
|
|
|
|
|
|
/** Windows-1253 */
|
|
|
|
pm_encoding_t pm_encoding_windows_1253 = {
|
2023-11-11 23:11:44 -05:00
|
|
|
.name = "Windows-1253",
|
2023-11-11 23:00:18 -05:00
|
|
|
.char_width = pm_encoding_single_char_width,
|
|
|
|
.alnum_char = pm_encoding_windows_1253_alnum_char,
|
|
|
|
.alpha_char = pm_encoding_windows_1253_alpha_char,
|
|
|
|
.isupper_char = pm_encoding_windows_1253_isupper_char,
|
|
|
|
.multibyte = false
|
|
|
|
};
|
|
|
|
|
|
|
|
/** Windows-1254 */
|
|
|
|
pm_encoding_t pm_encoding_windows_1254 = {
|
2023-11-11 23:11:44 -05:00
|
|
|
.name = "Windows-1254",
|
2023-11-11 23:00:18 -05:00
|
|
|
.char_width = pm_encoding_single_char_width,
|
|
|
|
.alnum_char = pm_encoding_windows_1254_alnum_char,
|
|
|
|
.alpha_char = pm_encoding_windows_1254_alpha_char,
|
|
|
|
.isupper_char = pm_encoding_windows_1254_isupper_char,
|
|
|
|
.multibyte = false
|
|
|
|
};
|
|
|
|
|
|
|
|
/** Windows-1255 */
|
|
|
|
pm_encoding_t pm_encoding_windows_1255 = {
|
2023-11-11 23:11:44 -05:00
|
|
|
.name = "Windows-1255",
|
2023-11-11 23:00:18 -05:00
|
|
|
.char_width = pm_encoding_single_char_width,
|
|
|
|
.alnum_char = pm_encoding_windows_1255_alnum_char,
|
|
|
|
.alpha_char = pm_encoding_windows_1255_alpha_char,
|
|
|
|
.isupper_char = pm_encoding_windows_1255_isupper_char,
|
|
|
|
.multibyte = false
|
|
|
|
};
|
|
|
|
|
|
|
|
/** Windows-1256 */
|
|
|
|
pm_encoding_t pm_encoding_windows_1256 = {
|
2023-11-11 23:11:44 -05:00
|
|
|
.name = "Windows-1256",
|
2023-11-11 23:00:18 -05:00
|
|
|
.char_width = pm_encoding_single_char_width,
|
|
|
|
.alnum_char = pm_encoding_windows_1256_alnum_char,
|
|
|
|
.alpha_char = pm_encoding_windows_1256_alpha_char,
|
|
|
|
.isupper_char = pm_encoding_windows_1256_isupper_char,
|
|
|
|
.multibyte = false
|
|
|
|
};
|
|
|
|
|
|
|
|
/** Windows-1257 */
|
|
|
|
pm_encoding_t pm_encoding_windows_1257 = {
|
2023-11-11 23:11:44 -05:00
|
|
|
.name = "Windows-1257",
|
2023-11-11 23:00:18 -05:00
|
|
|
.char_width = pm_encoding_single_char_width,
|
|
|
|
.alnum_char = pm_encoding_windows_1257_alnum_char,
|
|
|
|
.alpha_char = pm_encoding_windows_1257_alpha_char,
|
|
|
|
.isupper_char = pm_encoding_windows_1257_isupper_char,
|
|
|
|
.multibyte = false
|
|
|
|
};
|
|
|
|
|
|
|
|
/** Windows-1258 */
|
|
|
|
pm_encoding_t pm_encoding_windows_1258 = {
|
2023-11-11 23:11:44 -05:00
|
|
|
.name = "Windows-1258",
|
2023-11-11 23:00:18 -05:00
|
|
|
.char_width = pm_encoding_single_char_width,
|
|
|
|
.alnum_char = pm_encoding_windows_1258_alnum_char,
|
|
|
|
.alpha_char = pm_encoding_windows_1258_alpha_char,
|
|
|
|
.isupper_char = pm_encoding_windows_1258_isupper_char,
|
|
|
|
.multibyte = false
|
|
|
|
};
|