1RKCVTHAN(3) Library Functions Manual RKCVTHAN(3)
2
3
4
6 RkCvtHan / RkwCvtHan - convert double-width symbols, alphanumeric char‐
7 acters, hiragana, and katakana to single-width characters
8
10 #include <canna/RK.h>
11 int RkCvtHan(dst, maxdst, src, srclen)
12 unsigned char *dst;
13 int maxdst;
14 unsigned char *src;
15 int srclen;
16 int RkwCvtHan(dst, maxdst, src, srclen)
17 wchar_t *dst;
18 int maxdst;
19 wchar_t *src;
20 int srclen;
21
23 RkCvtHan converts the srclen bytes of double-width symbol, alphanumeric
24 characters, hiragana, and katakana data to single-width characters,
25 starting at the area src. A null character in src is not interpreted
26 as the end of the string. The conversion result is stored in the area
27 dst. Characters that are not subject to conversion are copied as they
28 are. The conversion result is truncated to adjust to character bound‐
29 aries in the EUC code when its byte length exceeds maxdst -1. dst is
30 padded with null characters at the end if possible. EUC code is used
31 to represent both src and dst.
32
33 RkwCvtHan is the wchar_t version of RkCvtHan. Arguments which specify
34 the length are regarded as they count the character length instead of
35 byte length.
36
37 NULL can be specified in dst. NULL overrides the entire conversion
38 result.
39
41 This function returns the byte length (or character length for
42 RkwCvtHan) of the conversion result, or returns 0 if the value of
43 maxdst is invalid.
44
45
46
47 RKCVTHAN(3)