libpqxx
The C++ client library for PostgreSQL
encodings.hxx File Reference
#include <cassert>
#include <iomanip>
#include <string>
#include <string_view>
#include "pqxx/encoding_group.hxx"
#include "pqxx/strconv.hxx"
+ Include dependency graph for encodings.hxx:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  pqxx::string_traits< encoding_group >
 
struct  pqxx::internal::glyph_scanner< encoding_group >
 Wrapper struct template for "find next glyph" functions. More...
 
struct  pqxx::internal::glyph_scanner< encoding_group::ascii_safe >
 ASCII, Latin-1, UTF-8, and the like. More...
 
struct  pqxx::internal::glyph_scanner< encoding_group::two_tier >
 Common encoding pattern: 1-byte ASCII, or 2-byte starting with high byte. More...
 
struct  pqxx::internal::glyph_scanner< encoding_group::gb18030 >
 GB18030 and its older subsets, including GBK. More...
 
struct  pqxx::internal::glyph_scanner< encoding_group::sjis >
 Shift-JIS family of encodings. More...
 

Namespaces

 pqxx
 The home of all libpqxx classes, functions, templates, etc.
 
 pqxx::internal
 Private namespace for libpqxx's internal use; do not access.
 

Functions

template<>
constexpr std::string_view pqxx::name_type< encoding_group > () noexcept
 
char const * pqxx::internal::name_encoding (int encoding_id) noexcept
 Return PostgreSQL's name for encoding enum value. More...
 
encoding_group pqxx::internal::enc_group (int, sl)
 Convert libpq encoding enum value to its libpqxx group. More...
 
PQXX_PURE constexpr PQXX_INLINE_ONLY unsigned char pqxx::internal::get_byte (std::string_view buffer, std::size_t offset) noexcept
 Extract byte from buffer, return as unsigned char. More...
 
void pqxx::internal::throw_for_encoding_error (char const *encoding_name, std::string_view buffer, std::size_t start, std::size_t count, sl loc)
 Throw an error reporting that input text is not properly encoded. More...
 
void pqxx::internal::throw_for_truncated_character (char const *encoding_name, std::string_view buffer, std::size_t start, sl loc)
 Throw an error reporting that the input is truncated in mid-character. More...
 
PQXX_PURE constexpr PQXX_INLINE_ONLY bool pqxx::internal::between_inc (unsigned char value, unsigned bottom, unsigned top) noexcept
 Does value lie between bottom and top, inclusive? More...
 
template<encoding_group ENC, char... NEEDLE>
constexpr PQXX_INLINE_COV std::size_t pqxx::internal::find_ascii_char (std::string_view haystack, std::size_t here, sl loc)
 Find any of the ASCII characters in NEEDLE in haystack. More...
 
template<char... NEEDLE>
PQXX_PURE PQXX_RETURNS_NONNULL constexpr PQXX_INLINE_COV char_finder_func * pqxx::internal::get_char_finder (encoding_group enc, sl loc)
 Look up a character search function for an encoding group. More...
 

Variables

template<>
constexpr std::string_view pqxx::type_name< encoding_group > {"encoding_group"}