fkibmjtoeuc(3K) 3/11/92 fkibmjtoeuc(3K)
NAME
fkibmjtoeuc - IBM host code to EUC kanji converter
SYNOPSIS
cc [flag...] file... -lkanji [library...]
#include <mlx-j/kanji.h>
int fkibmjtoeuc(FILE *in, FILE *out, int exp);
DESCRIPTION
fkibmjtoeuc converts text in IBM Japanese (Katakana) Kanji Mixed Host
Code (IBM CCSID's 13218 and 09122) into EUC.
The exp argument must be set to KJEXP or KJNOEXP. KJEXP indicates
that half-size katakana should be expanded to their full-size
equivalents, KJNOEXP causes half-size katakana to be preserved in
the output.
in and out are the input and output stream for conversion,
respectively. in must be open for reading, out must be open for
writing.
RETURN VALUE
Successful conversion returns a value of 0, I/O errors on in or out
return -1. Otherwise, one of the (non-fatal) error codes below is
returned. Conversion does not stop when one of these errors is
detected.
KJERROR
An invalid byte or byte sequence was detected in the input.
Typically, this happens when a byte which introduces a kanji
character is not followed by a byte to validly complete it, or
when a partial character is found at EOF.
KJNOMAP
An IBM host code kanji character which does not exist in EUC was
present in the input. Such characters are skipped.
NOTES
Invalid byte sequences in the input are copied through to the output
unchanged.
in must initially be in shifted-out mode.
BUGS
If more than one error condition is detected during conversion, the
return code always indicates the first problem that was found.
Invalid byte sequences in the input may cause fkibmjtoeuc to lose
synchronization with kanji character boundaries. If this happens, all
converted output following the error is likely to be garbage.
Page 1 Reliant UNIX 5.44 3, 1911
fkibmjtoeuc(3K) 3/11/92 fkibmjtoeuc(3K)
FILES
/usr/lib/libkanji.a
SEE ALSO
kibmjtoeuc(3K), sibmjtoeuc(3K), cibmjtoeuc(3K), fkeuctoibmj(3K),
fkconv(3K).
Page 2 Reliant UNIX 5.44 3, 1911