[text.encoding.overview] (original) (raw)
28 Text processing library [text]
28.4 Text encodings identification [text.encoding]
28.4.2 Class text_encoding [text.encoding.class]
28.4.2.1 Overview [text.encoding.overview]
The class text_encoding describes an interface for accessing the IANA Character Sets registry[bib].
namespace std { struct text_encoding { static constexpr size_t max_name_length = 63;enum class id : int_least32_t { see below };using enum id;constexpr text_encoding() = default;constexpr explicit text_encoding(string_view enc) noexcept;constexpr text_encoding(id i) noexcept;constexpr id mib() const noexcept;constexpr const char* name() const noexcept;struct aliases_view;constexpr aliases_view aliases() const noexcept;friend constexpr bool operator==(const text_encoding& a,const text_encoding& b) noexcept;friend constexpr bool operator==(const text_encoding& encoding, id i) noexcept;static consteval text_encoding literal() noexcept;static text_encoding environment();template<id i> static bool environment_is();private: id mib_ = id::unknown; char _name__[max_name_length + 1] = {0}; static constexpr bool comp-name(string_view a, string_view b); };}