4#include <system/text/encoding.h>
34 ICUEncoding(
const Details::EncodingInfoInternal* encoding_info);
45 ASPOSECPP_SHARED_API
int GetByteCount(
const char_t* chars,
int count)
override;
53 ASPOSECPP_SHARED_API
int GetBytes(
const char_t* chars,
int char_count, uint8_t* bytes,
int byte_count)
override;
59 ASPOSECPP_SHARED_API
int GetCharCount(
const uint8_t* bytes,
int count)
override;
67 ASPOSECPP_SHARED_API
int GetChars(
const uint8_t *bytes,
int byte_count, char_t *chars,
int char_count)
override;
97 void SetICUCallbacks();
100 std::shared_ptr<UConverter> m_icu_converter;
Encoding services.
Definition: encoding.h:67
virtual int GetByteCount(ArrayPtr< char_t > chars, int index, int count)
Get the number of characters needed to encode a character buffer.
virtual int GetBytes(ArrayPtr< char_t > chars, int char_index, int char_count, ArrayPtr< uint8_t > bytes, int byte_index)
Get the bytes that result from encoding a character buffer.
virtual int GetCharCount(ArrayPtr< uint8_t > bytes, int index, int count)
Get the number of characters needed to decode a byte buffer.
virtual int GetChars(ArrayPtr< uint8_t > bytes, int byte_index, int byte_count, ArrayPtr< char_t > chars, int char_index)
Get the characters that result from decoding a byte buffer.
Decoder that uses ICU for decoding. Objects of this class should only be allocated using System::Make...
Definition: icu_decoder.h:27
Encoder that uses ICU for encoding. Objects of this class should only be allocated using System::Make...
Definition: icu_encoder.h:20
ICU-based encoding implementation. FOR INTERNAL USE. Objects of this class should only be allocated u...
Definition: icu_encoding.h:17
EncoderPtr GetEncoder() override
Get an encoder that forwards requests to this object.
~ICUEncoding() override
Destructor.
int GetCharCount(const uint8_t *bytes, int count) override
Get the number of characters needed to decode a byte buffer.
DecoderPtr GetDecoder() override
Get a decoder that forwards requests to this object.
ArrayPtr< uint8_t > GetPreamble() override
Returns a sequence of bytes that denotes the encoding (e. g. BOM).
int GetChars(const uint8_t *bytes, int byte_count, char_t *chars, int char_count) override
Get the characters that result from decoding a byte buffer.
int GetBytes(const char_t *chars, int char_count, uint8_t *bytes, int byte_count) override
Get the bytes that result from encoding a character buffer.
bool operator==(const ICUEncoding &other) const
Compares encodings using codepages.
int GetMaxCharCount(int byte_count) override
Get the maximum number of characters needed to decode a specified number of bytes.
ICUEncoding(const Details::EncodingInfoInternal *encoding_info)
Constructor.
int GetMaxByteCount(int char_count) override
Get the maximum number of bytes needed to encode a specified number of characters.
int GetByteCount(const char_t *chars, int count) override
Get the number of characters needed to encode a character buffer.
@ Text
Defines color adjustment information for text.
Definition: db_command.h:9