RKCVTEUC(3)
β¨ RKCVTEUC(3) β¨
okay so bestie, we're in the Library Functions Manual today and this one's a lil cutie: RkCvtEuc π it's the glow-up translator that takes your shift JIS text and turns it into EUC text. no cap, that's the whole vibe.
π NAME π
RkCvtEuc β convert shift JIS code to EUC code
like. it literally does what it says on the tin. iconic behavior fr fr π¦
πΈ SYNOPSIS πΈ
#include <canna/RK.h>
int RkCvtEuc(dst, maxdst, src, srclen)
unsigned char *dst;
int maxdst;
unsigned char *src;
int srclen;
she's giving very much old-school K&R prototype energy and we respect it π
π«Ά DESCRIPTION π«Ά
so here's the tea β RkCvtEuc takes srclen bytes of shift JIS data starting at the area src and converts them into EUC. that's it. that's the job.
β οΈ important: a null character insrcis not interpreted as the end of the string. she does not stop at\0, she keeps going for the fullsrclenbytes. do not be fooled bestie π
the conversion result gets dropped into the area dst. characters that aren't subject to conversion? they just get copied over as they are, untouched, no notes. π
now for the fiddly bit β if the byte length of the conversion result exceeds maxdst - 1, the result gets truncated so it lines up with character boundaries in the EUC code. we're not out here slicing a character in half, that would be a crime π boundaries only, periodt.
and if there's room, dst gets padded with null characters at the end. she's polite like that. πΈ
hot tip πNULLcan be specified indst. andNULLoverrides the entire conversion result. like, the whole thing. bye β¨
π RETURN VALUE π
- she returns the byte length of the conversion result π₯
- or she returns
0if the value ofmaxdstis invalid. that's the "girl what did you pass me" signal π
and that's the whole page, bestie! π this lil number lives in the Library Functions Manual and goes by RKCVTEUC(3). mwah, go convert something cute πβ¨π
π¦ where this page comes from
- debian bookworm: libcanna1g-dev 3.7p3-20 Β· ISC
- debian trixie: libcanna1g-dev 3.7p3-25 Β· ISC
- ubuntu jammy: libcanna1g-dev 3.7p3-17 Β· ISC
- ubuntu noble: libcanna1g-dev 3.7p3-20 Β· ISC
- ubuntu questing: libcanna1g-dev 3.7p3-26
- ubuntu resolute: libcanna1g-dev 3.7p3-26build1 Β· ISC
- ubuntu stonking: libcanna1g-dev 3.7p3-29 Β· ISC
- Copyright 1994 NEC Corporation, Tokyo, Japan
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms