skconv(3K) 3/11/92 skconv(3K)
NAME
skconv, jis7tosj, jis7touj, jis8tosj, jis8touj, jistosj, jistouj,
sjtojis, sjtojis7, sjtojis8, sjtouj, ujtojis, ujtojis7, ujtojis8,
ujtosj - kanji string conversions
SYNOPSIS
cc [flag...] file... -lkanji [library...]
#include <mlx-j/kanji.h>
unsigned char *skconv(unsigned char *dest, sizet dlen, int ofmt,
unsigned char *src, int ifmt);
unsigned char *jis7tosj(unsigned char *dest, unsigned char *src);
unsigned char *jis7touj(unsigned char *dest, unsigned char *src);
unsigned char *jis8tosj(unsigned char *dest, unsigned char *src);
unsigned char *jis8touj(unsigned char *dest, unsigned char *src);
unsigned char *jistosj(unsigned char *dest, unsigned char *src);
unsigned char *jistouj(unsigned char *dest, unsigned char *src);
unsigned char *sjtojis(unsigned char *dest, unsigned char *src);
unsigned char *sjtojis7(unsigned char *dest, unsigned char *src);
unsigned char *sjtojis8(unsigned char *dest, unsigned char *src);
unsigned char *sjtouj(unsigned char *dest, unsigned char *src);
unsigned char *ujtojis(unsigned char *dest, unsigned char *src);
unsigned char *ujtojis7(unsigned char *dest, unsigned char *src);
unsigned char *ujtojis8(unsigned char *dest, unsigned char *src);
unsigned char *ujtosj(unsigned char *dest, unsigned char *src);
DESCRIPTION
These routines handle arbitrary conversions of EUC, Shift-JIS, JIS,
Old JIS and NEC-JIS encoded strings.
src points at the null-terminated source string, dest points at a
destination buffer of length dlen bytes.
ifmt and ofmt determine the input and output code and may take the
following values:
KJJIS - (New) JIS
Page 1 Reliant UNIX 5.44 3, 1911
skconv(3K) 3/11/92 skconv(3K)
KJOJIS - Old JIS
KJNECJIS - NEC-JIS
KJSJIS - Shift-JIS
KJEUC - Extended UNIX Code
skconv converts strings between any two encodings, checking for output
buffer overflow. The remaining routines handle specific conversions,
and do not check for output buffer overflow:
jis7tosj - JIS7 to Shift-JIS
jis7touj - JIS7 to EUC
jis8tosj - JIS8 to Shift-JIS
jis8touj - JIS8 to EUC
jistosj - JIS8 to Shift-JIS
jistouj - JIS8 to EUC
sjtojis - Shift-JIS to JIS8
sjtojis7 - Shift-JIS to JIS7
sjtojis8 - Shift-JIS to JIS8
sjtouj - Shift-JIS to EUC
ujtojis - EUC to JIS8
ujtojis7 - EUC to JIS7
ujtojis8 - EUC to JIS8
ujtosj - EUC to Shift-JIS
RETURN VALUE
Successful conversion returns a (null-terminated) value of dest. If
errors are detected during conversion, NULL is returned, and dest
contains garbage.
NOTES
Invalid byte sequences in the source string are copied through to the
destination string unchanged (in shifted-out mode).
src is assumed to be initially in shifted-out mode.
BUGS
Invalid byte sequences in the input may cause loss of synchronization
with kanji character boundaries. If this happens, all converted output
following the error is likely to be garbage.
FILES
/usr/lib/libkanji.a
SEE ALSO
fkconv(3K), ckconv(3K).
Page 2 Reliant UNIX 5.44 3, 1911