Loading...
Searching...
No Matches
encoding_group.hxx
#ifndef PQXX_H_ENCODING_GROUP
#define PQXX_H_ENCODING_GROUP
#include <cstddef>
namespace pqxx::internal
{
// Types of encodings supported by PostgreSQL, see
// https://www.postgresql.org/docs/current/static/multibyte.html#CHARSET-TABLE
enum class encoding_group
{
// Handles all single-byte fixed-width encodings
MONOBYTE,
// Multibyte encodings.
// Many of these can embed ASCII-like bytes inside multibyte characters,
// notably Big5, SJIS, SHIFT_JIS_2004, GP18030, GBK, JOHAB, UHC.
BIG5,
EUC_CN,
EUC_JP,
EUC_KR,
EUC_TW,
GB18030,
GBK,
JOHAB,
MULE_INTERNAL,
SJIS,
UHC,
UTF8,
};
// TODO: Get rid of these. Specialise at higher level.
using glyph_scanner_func =
std::size_t(char const buffer[], std::size_t buffer_len, std::size_t start);
using char_finder_func =
std::size_t(std::string_view haystack, std::size_t start);
} // namespace pqxx::internal
#endif
pqxx::internal
Internal items for libpqxx' own use. Do not use these yourself.
Definition encodings.cxx:33
pqxx::internal::glyph_scanner_func
std::size_t(char const buffer[], std::size_t buffer_len, std::size_t start) glyph_scanner_func
Function type: "find the end of the current glyph.".
Definition encoding_group.hxx:53
pqxx::internal::char_finder_func
std::size_t(std::string_view haystack, std::size_t start) char_finder_func
Function type: "find first occurrence of specific any of ASCII characters.".
Definition encoding_group.hxx:71