15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
|
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
|
-
+
|
#include "config.h"
#import "OFString.h"
#import "common.h"
const of_char16_t of_iso_8859_3_table[] = {
const OFChar16 of_iso_8859_3_table[] = {
0x00A0, 0x0126, 0x02D8, 0x00A3, 0x00A4, 0xFFFF, 0x0124, 0x00A7,
0x00A8, 0x0130, 0x015E, 0x011E, 0x0134, 0x00AD, 0xFFFF, 0x017B,
0x00B0, 0x0127, 0x00B2, 0x00B3, 0x00B4, 0x00B5, 0x0125, 0x00B7,
0x00B8, 0x0131, 0x015F, 0x011F, 0x0135, 0x00BD, 0xFFFF, 0x017C,
0x00C0, 0x00C1, 0x00C2, 0xFFFF, 0x00C4, 0x010A, 0x0108, 0x00C7,
0x00C8, 0x00C9, 0x00CA, 0x00CB, 0x00CC, 0x00CD, 0x00CE, 0x00CF,
0xFFFF, 0x00D1, 0x00D2, 0x00D3, 0x00D4, 0x0120, 0x00D6, 0x00D7,
|
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
|
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
|
-
+
-
+
|
static const unsigned char page2[] = {
0xA2, 0xFF
};
static const uint8_t page2Start = 0xD8;
bool
of_unicode_to_iso_8859_3(const of_unichar_t *input, unsigned char *output,
of_unicode_to_iso_8859_3(const OFUnichar *input, unsigned char *output,
size_t length, bool lossy)
{
for (size_t i = 0; i < length; i++) {
of_unichar_t c = input[i];
OFUnichar c = input[i];
if OF_UNLIKELY (c > 0x7F) {
uint8_t idx;
if OF_UNLIKELY (c > 0xFFFF) {
if (lossy) {
output[i] = '?';
|