2 * Simplistic program to correct SJIS inside strings. When a trail byte is a
3 * backslash it needs to be doubled.
17 while (fgets(buffer
, BUFSIZ
, stdin
) != NULL
)
19 for (p
= buffer
; *p
!= 0; p
++)
21 if (strncmp(p
, "charset=euc-jp", 14) == 0)
23 fputs("charset=cp932", stdout
);
26 else if (strncmp(p
, "ja.po - Japanese message file", 29) == 0)
28 fputs("ja.sjis.po - Japanese message file for Vim (version 6.x)\n", stdout
);
29 fputs("# generated from ja.po, DO NOT EDIT", stdout
);
33 else if (*(unsigned char *)p
== 0x81 && p
[1] == '_')