133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
|
of_unicode_to_codepage_437(const of_unichar_t *input, unsigned char *output,
size_t length, bool lossy)
{
for (size_t i = 0; i < length; i++) {
of_unichar_t c = input[i];
if OF_UNLIKELY (c > 0x7F) {
uint8_t index;
if OF_UNLIKELY (c > 0xFFFF) {
if (lossy) {
output[i] = '?';
continue;
} else
return false;
|
|
|
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
|
of_unicode_to_codepage_437(const of_unichar_t *input, unsigned char *output,
size_t length, bool lossy)
{
for (size_t i = 0; i < length; i++) {
of_unichar_t c = input[i];
if OF_UNLIKELY (c > 0x7F) {
uint8_t idx;
if OF_UNLIKELY (c > 0xFFFF) {
if (lossy) {
output[i] = '?';
continue;
} else
return false;
|