Datum koi8r_to_mic(PG_FUNCTION_ARGS) { unsigned char *src = (unsigned char *) PG_GETARG_CSTRING(2); unsigned char *dest = (unsigned char *) PG_GETARG_CSTRING(3); int len = PG_GETARG_INT32(4); CHECK_ENCODING_CONVERSION_ARGS(PG_KOI8R, PG_MULE_INTERNAL); latin2mic(src, dest, len, LC_KOI8_R, PG_KOI8R); PG_RETURN_VOID(); }
static void latin42mic(const unsigned char *l, unsigned char *p, int len) { latin2mic(l, p, len, LC_ISO8859_4, PG_LATIN4); }
/* koi8r2mic: KOI8-R to Mule internal code */ static void koi8r2mic(const unsigned char *l, unsigned char *p, int len) { latin2mic(l, p, len, LC_KOI8_R, PG_KOI8R); }