|
Lines 436-444
Link Here
|
| 436 |
|
436 |
|
| 437 |
#ifndef DEBUG |
437 |
#ifndef DEBUG |
| 438 |
if (strcmp(i_cp->cp_name, "utf-8") == 0) { |
438 |
if (strcmp(i_cp->cp_name, "utf-8") == 0) { |
|
|
439 |
char hook[2]; |
| 440 |
hook[0] = o_cp->cp_data[6]; |
| 441 |
hook[1] = o_cp->cp_data[34]; |
| 442 |
|
| 439 |
while ((c = getc(in)) != EOF) { |
443 |
while ((c = getc(in)) != EOF) { |
| 440 |
if (c == (u_char)0xd0 || c == (u_char)0xd1) { |
444 |
if (c == (u_char)0xd0 || c == (u_char)0xd1) { |
| 441 |
; |
445 |
conv_tab[0x91] = c == 0xd1 ? hook[0] : hook[1]; |
| 442 |
} else { |
446 |
} else { |
| 443 |
putc(conv_tab[(u_char) c], out); |
447 |
putc(conv_tab[(u_char) c], out); |
| 444 |
} |
448 |
} |
|
Lines 484-491
Link Here
|
| 484 |
recode_buf(u_char *conv_tab, u_char *buf, int len, FILE *out) |
488 |
recode_buf(u_char *conv_tab, u_char *buf, int len, FILE *out) |
| 485 |
{ |
489 |
{ |
| 486 |
if (strcmp(i_cp->cp_name, "utf-8") == 0) { |
490 |
if (strcmp(i_cp->cp_name, "utf-8") == 0) { |
|
|
491 |
char hook[2]; |
| 492 |
hook[0] = o_cp->cp_data[6]; |
| 493 |
hook[1] = o_cp->cp_data[34]; |
| 494 |
|
| 487 |
while (len--) { |
495 |
while (len--) { |
| 488 |
if (*buf == (u_char)0xd0 || *buf == (u_char)0xd1) { |
496 |
if (*buf == (u_char)0xd0 || *buf == (u_char)0xd1) { |
|
|
497 |
conv_tab[0x91] = *buf == 0xd1 ? hook[0] : hook[1]; |
| 489 |
++buf; |
498 |
++buf; |
| 490 |
} else { |
499 |
} else { |
| 491 |
putc(conv_tab[*buf++], out); |
500 |
putc(conv_tab[*buf++], out); |