124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
|
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
|
-
+
-
+
+
+
+
+
+
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x94
};
static const uint8_t page25Start = 0x00;
bool OF_VISIBILITY_HIDDEN
_OFUnicodeToKOI8U(const OFUnichar *input, unsigned char *output, size_t length,
bool lossy)
bool lossy, bool insecure)
{
for (size_t i = 0; i < length; i++) {
OFUnichar c = input[i];
OFUnichar c;
if OF_UNLIKELY (!insecure && input[i] == 0)
return false;
c = input[i];
if OF_UNLIKELY (c > 0x7F) {
uint8_t idx;
if OF_UNLIKELY (c > 0xFFFF) {
if (lossy) {
output[i] = '?';
|