1/*-------------------------------------------------------------------------
3 * EUC_JIS_2004 <--> UTF8
5 * Portions Copyright (c) 1996-2025, PostgreSQL Global Development Group
6 * Portions Copyright (c) 1994, Regents of the University of California
9 * src/backend/utils/mb/conversion_procs/utf8_and_euc2004/utf8_and_euc2004.c
11 *-------------------------------------------------------------------------
17#include "../../Unicode/euc_jis_2004_to_utf8.map"
18#include "../../Unicode/utf8_to_euc_jis_2004.map"
21 .
name =
"utf8_and_euc2004",
30 * INTEGER, -- source encoding id
31 * INTEGER, -- destination encoding id
32 * CSTRING, -- source string (null terminated C string)
33 * CSTRING, -- destination string (null terminated C string)
34 * INTEGER, -- source string length
35 * BOOL -- if true, don't throw an error if conversion fails
38 * Returns the number of bytes successfully converted.
53 &euc_jis_2004_to_unicode_tree,
54 LUmapEUC_JIS_2004_combined,
lengthof(LUmapEUC_JIS_2004_combined),
74 &euc_jis_2004_from_unicode_tree,
75 ULmapEUC_JIS_2004_combined,
lengthof(ULmapEUC_JIS_2004_combined),
int UtfToLocal(const unsigned char *utf, int len, unsigned char *iso, const pg_mb_radix_tree *map, const pg_utf_to_local_combined *cmap, int cmapsize, utf_local_conversion_func conv_func, int encoding, bool noError)
int LocalToUtf(const unsigned char *iso, int len, unsigned char *utf, const pg_mb_radix_tree *map, const pg_local_to_utf_combined *cmap, int cmapsize, utf_local_conversion_func conv_func, int encoding, bool noError)
#define PG_GETARG_CSTRING(n)
#define PG_RETURN_INT32(x)
#define PG_GETARG_INT32(n)
#define PG_GETARG_BOOL(n)
#define CHECK_ENCODING_CONVERSION_ARGS(srcencoding, destencoding)
Datum euc_jis_2004_to_utf8(PG_FUNCTION_ARGS)
PG_FUNCTION_INFO_V1(euc_jis_2004_to_utf8)
Datum utf8_to_euc_jis_2004(PG_FUNCTION_ARGS)
PG_MODULE_MAGIC_EXT(.name="utf8_and_euc2004",.version=PG_VERSION)