std::encoding_state(3)
π std::encoding_state β a whole vibe for encoding glow-ups
okay bestie, listen. this is std::encoding_state(3) from the Library Functions Manual, and she's the friend who speaks every language and translates flawlessly between all of them. basically: an extension so you can use iconv to deal with character encodings. iconic behavior honestly. π
πΈ NAME πΈ
std::encoding_state β Extension to use iconv for dealing with character encodings.
like. that's the whole point of her. she's the encoding middle-manager. π
β¨ SYNOPSIS β¨
#include <codecvt_specializations.h>
π«Ά Public Types
typedef iconv_t descriptor_typeβ the descriptor type. yes bestie,iconv_tis her whole thing. π
π Public Member Functions
encoding_state (const char *__int, const char *__ext, int __ibom=0, int __ebom=0, int __bytes=1)β the constructor that takes an internal encoding, an external encoding, and optionally an internal BOM defaulting to0, an external BOM defaulting to0, and a byte count defaulting to1. defaults are slaying, as always. β¨encoding_state (const encoding_state &__obj)β copy constructor. she copies her whole vibe onto__obj. π¦int character_ratio () constβ gives you the character ratio. lowkey useful.int external_bom () constβ the external BOM. yes it's a number. πconst std::string external_encoding () constβ hands you back the external encoding as astd::string. no cap.bool good () const throw ()β vibe check!! returns whether she's good. it's abool, it doesn't throw, she would never. πΈconst descriptor_type & in_descriptor () constβ the input descriptor, by const reference, obviously.int internal_bom () constβ the internal BOM. the inside one. πconst std::string internal_encoding () constβ the internal encoding, as astd::string.encoding_state & operator= (const encoding_state &__obj)β assignment operator, returns a reference to herself like the main character she is. πconst descriptor_type & out_descriptor () constβ the output descriptor, const reference, periodt.
π§ Protected Member Functions
void construct (const encoding_state &__obj)β constructs from__obj. protected, so don't get any ideas unless you're a subclass. πvoid destroy () throw ()β tears it all down. it does not throw. she's too composed for that. πvoid init ()β sets things up. protected. π€«
π Protected Attributes
int _M_bytesβ the byte count she's holding. πint _M_ext_bomβ the external BOM member. β¨std::string _M_ext_encβ the external encoding member. π¦descriptor_type _M_in_descβ the input descriptor member. πΈint _M_int_bomβ the internal BOM member. πstd::string _M_int_encβ the internal encoding member. π«Άdescriptor_type _M_out_descβ the output descriptor member. π
ngl bestie, those _M_ names are protected, which means they're for the family only. don't touch unless you were born into the inheritance hierarchy. π₯
π Detailed Description π
Extension to use iconv for dealing with character encodings.
like that's it, that's the whole summary, and she ate. it's giving "I convert your encodings and I look good doing it." π
π Author π
Generated automatically by Doxygen for libstdc++ from the source code.
π so that's the whole page, bestie!! this diva is documented by libstdc++ and stamped with std::encoding_state(3) β go convert some encodings, you absolute legend. πβ¨π¦π
π¦ where this page comes from
- arch rolling: gcc 16.2.1+r23+gd564253eb6c8-1 Β· GPL-3.0-or-later WITH GCC-exception-3.1 AND GFDL-1.3-or-later
- fedora 44: libstdc++-docs 16.0.1-0.10.fc44 Β· GPL-3.0-or-later AND LGPL-3.0-or-later AND (GPL-3.0-or-later WITH GCC-exception-3.1) AND (GPL-3.0-or-later WITH Texinfo-exception) AND (LGPL-2.1-or-later WITH GCC-exception-2.0) AND (GPL-2.0-or-later WITH GCC-exception-2.0) AND (GPL-2.0-or-later WITH GNU-compiler-exception) AND BSL-1.0 AND GFDL-1.3-or-later AND Linux-man-pages-copyleft-2-para AND SunPro AND BSD-1-Clause AND BSD-2-Clause AND BSD-2-Clause-Views AND BSD-3-Clause AND BSD-4-Clause AND BSD-Source-Code AND Zlib AND MIT AND Apache-2.0 AND (Apache-2.0 WITH LLVM-Exception) AND ZPL-2.1 AND ISC AND LicenseRef-Fedora-Public-Domain AND HP-1986 AND curl AND Martin-Birgmeier AND HPND-Markus-Kuhn AND dtoa AND SMLNJ AND AMD-newlib AND OAR AND HPND-merchantability-variant AND HPND-Intel
- fedora 44: libstdc++-docs 16.2.1-2.fc44
- fedora 44: libstdc++-docs 16.2.1-3.fc44 Β· GPL-3.0-or-later AND LGPL-3.0-or-later AND (GPL-3.0-or-later WITH GCC-exception-3.1) AND (GPL-3.0-or-later WITH Texinfo-exception) AND (LGPL-2.1-or-later WITH GCC-exception-2.0) AND (GPL-2.0-or-later WITH GCC-exception-2.0) AND (GPL-2.0-or-later WITH GNU-compiler-exception) AND BSL-1.0 AND GFDL-1.3-or-later AND Linux-man-pages-copyleft-2-para AND SunPro AND BSD-1-Clause AND BSD-2-Clause AND BSD-2-Clause-Views AND BSD-3-Clause AND BSD-4-Clause AND BSD-Source-Code AND Zlib AND MIT AND Apache-2.0 AND (Apache-2.0 WITH LLVM-Exception) AND ZPL-2.1 AND ISC AND LicenseRef-Fedora-Public-Domain AND HP-1986 AND curl AND Martin-Birgmeier AND HPND-Markus-Kuhn AND dtoa AND SMLNJ AND AMD-newlib AND OAR AND HPND-merchantability-variant AND HPND-Intel
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms