#include "postgres.h"
#include "fmgr.h"
#include "mb/pg_wchar.h"
#include "../../Unicode/utf8_to_koi8r.map"
#include "../../Unicode/koi8r_to_utf8.map"
#include "../../Unicode/utf8_to_koi8u.map"
#include "../../Unicode/koi8u_to_utf8.map"
Go to the source code of this file.
◆ koi8r_to_utf8()
Definition at line 69 of file utf8_and_cyrillic.c.
70{
75 int converted;
76
78
80 &koi8r_to_unicode_tree,
81 NULL, 0,
82 NULL,
84 noError);
85
87}
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)
References CHECK_ENCODING_CONVERSION_ARGS, generate_unaccent_rules::dest, len, LocalToUtf(), PG_GETARG_BOOL, PG_GETARG_CSTRING, PG_GETARG_INT32, PG_KOI8R, PG_RETURN_INT32, and PG_UTF8.
◆ koi8u_to_utf8()
Definition at line 111 of file utf8_and_cyrillic.c.
112{
117 int converted;
118
120
122 &koi8u_to_unicode_tree,
123 NULL, 0,
124 NULL,
126 noError);
127
129}
References CHECK_ENCODING_CONVERSION_ARGS, generate_unaccent_rules::dest, len, LocalToUtf(), PG_GETARG_BOOL, PG_GETARG_CSTRING, PG_GETARG_INT32, PG_KOI8U, PG_RETURN_INT32, and PG_UTF8.
◆ PG_FUNCTION_INFO_V1() [1/4]
◆ PG_FUNCTION_INFO_V1() [2/4]
◆ PG_FUNCTION_INFO_V1() [3/4]
◆ PG_FUNCTION_INFO_V1() [4/4]
◆ PG_MODULE_MAGIC_EXT()
PG_MODULE_MAGIC_EXT |
( |
. |
name = "utf8_and_cyrillic" , |
|
|
. |
version = PG_VERSION |
|
) |
| |
◆ utf8_to_koi8r()
Definition at line 48 of file utf8_and_cyrillic.c.
49{
54 int converted;
55
57
59 &koi8r_from_unicode_tree,
60 NULL, 0,
61 NULL,
63 noError);
64
66}
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)
References CHECK_ENCODING_CONVERSION_ARGS, generate_unaccent_rules::dest, len, PG_GETARG_BOOL, PG_GETARG_CSTRING, PG_GETARG_INT32, PG_KOI8R, PG_RETURN_INT32, PG_UTF8, and UtfToLocal().
◆ utf8_to_koi8u()
Definition at line 90 of file utf8_and_cyrillic.c.
91{
96 int converted;
97
99
101 &koi8u_from_unicode_tree,
102 NULL, 0,
103 NULL,
105 noError);
106
108}
References CHECK_ENCODING_CONVERSION_ARGS, generate_unaccent_rules::dest, len, PG_GETARG_BOOL, PG_GETARG_CSTRING, PG_GETARG_INT32, PG_KOI8U, PG_RETURN_INT32, PG_UTF8, and UtfToLocal().