40 typename Ch; //! Type of character. A "character" is actually a code unit in unicode's definition.
147#define COPY() c = is.Take(); *codepoint = (*codepoint << 6) | (static_cast<unsigned char>(c) & 0x3Fu)
262 \tparam CharType Type for storing 16-bit UTF-16 data. Default is wchar_t. C++11 may use char16_t instead.
265 \note For in-memory access, no need to concern endianness. The code units and code points are represented by CPU's endianness.
279 RAPIDJSON_ASSERT(codepoint < 0xD800 || codepoint > 0xDFFF); // Code point itself cannot be surrogate pair
295 RAPIDJSON_ASSERT(codepoint < 0xD800 || codepoint > 0xDFFF); // Code point itself cannot be surrogate pair
411 \tparam CharType Type for storing 32-bit UTF-32 data. Default is unsigned. C++11 may use char32_t instead.
414 \note For in-memory access, no need to concern endianness. The code units and code points are represented by CPU's endianness.
612/*! \note This class can be used with AutoUTFInputtStream and AutoUTFOutputStream, which provides GetType().
659 //! Take one Unicode codepoint from source encoding, convert it to target encoding and put it to the output stream.
694 os.Put(is.Take()); // Just copy one code unit. This semantic is different from primary template class.
700 PutUnsafe(os, is.Take()); // Just copy one code unit. This semantic is different from primary template class.
Concept for encoding of Unicode characters.
Concept for reading and writing characters.
void PutUnsafe(Stream &stream, typename Stream::Ch c)
Write character to a stream, presuming buffer is reserved.
Definition stream.h:91
common definitions and configuration
#define RAPIDJSON_STATIC_ASSERT(x)
(Internal) macro to check for conditions at compile-time
Definition rapidjson.h:437
Dynamically select encoding according to stream's runtime-specified UTF encoding type.
Definition encodings.h:615
static RAPIDJSON_FORCEINLINE bool Transcode(InputStream &is, OutputStream &os)
Take one Unicode codepoint from source encoding, convert it to target encoding and put it to the outp...
Definition encodings.h:661
static RAPIDJSON_FORCEINLINE bool Validate(InputStream &is, OutputStream &os)
Validate one Unicode codepoint from an encoded stream.
Definition encodings.h:680