MCPcopy Create free account
hub / github.com/apache/cloudberry / pg_encoding_verifymbchar

Function pg_encoding_verifymbchar

src/common/wchar.c:2001–2007  ·  view source on GitHub ↗

* Verify the first multibyte character of the given string. * Return its byte length if good, -1 if bad. (See comments above for * full details of the mbverifychar API.) */

Source from the content-addressed store, hash-verified

1999 * full details of the mbverifychar API.)
2000 */
2001int
2002pg_encoding_verifymbchar(int encoding, const char *mbstr, int len)
2003{
2004 return (PG_VALID_ENCODING(encoding) ?
2005 pg_wchar_table[encoding].mbverifychar((const unsigned char *) mbstr, len) :
2006 pg_wchar_table[PG_SQL_ASCII].mbverifychar((const unsigned char *) mbstr, len));
2007}
2008
2009/*
2010 * Verify that a string is valid for the given encoding.

Callers 15

LocalToUtfFunction · 0.85
euc_kr2micFunction · 0.85
mic2euc_krFunction · 0.85
mic2sjisFunction · 0.85
euc_jp2micFunction · 0.85
mic2euc_jpFunction · 0.85
euc_jp2sjisFunction · 0.85
sjis2euc_jpFunction · 0.85
euc_tw2big5Function · 0.85
big52euc_twFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected