Overview | Namespace | Class | Index | Help |
Data of Class _rtl_TextEncodingInfo
- StructSize
- sal_uInt32 StructSize;
- Summary
- The size (in bytes) of this structure. Should be 12.
- MinimumCharSize
- sal_uInt8 MinimumCharSize;
- Summary
- The minimum number of bytes needed to encode any character in the given encoding.
- Description
- Can be rather meaningless for encodings that encode global state along with the characters (e.g., ISO-2022 encodings).
- MaximumCharSize
- sal_uInt8 MaximumCharSize;
- Summary
- The maximum number of bytes needed to encode any character in the given encoding.
- Description
- Can be rather meaningless for encodings that encode global state along with the characters (e.g., ISO-2022 encodings).
- AverageCharSize
- sal_uInt8 AverageCharSize;
- Summary
- The average number of bytes needed to encode a character in the given encoding.
- Reserved
- sal_uInt8 Reserved;
- Summary
- An unused byte, for padding.
- Flags
- sal_uInt32 Flags;
- Summary
- Any combination of the RTL_TEXTENCODING_INFO flags.
- Description
- RTL_TEXTENCODING_INFO_CONTEXT: The encoding uses some mechanism (like state-changing byte sequences) to switch between different modes (e.g., to encode multiple character repertoires within the same byte ranges). Even if an encoding does not have the CONTEXT property, interpretation of certain byte values within that encoding can depend on context (e.g., a certain byte value could be either a single-byte character or a subsequent byte of a multi-byte character). Likewise, the single shift characters (SS2 and SS3) used by some of the EUC encodings (to denote that the following bytes constitute a character from another character repertoire) do not imply that encodings making use of these characters have the CONTEXT property. Examples of encodings that do have the CONTEXT property are the ISO-2022 encodings and UTF-7. RTL_TEXTENCODING_INFO_ASCII: The encoding is a superset of ASCII. More specifically, any appearance of a byte in the range 0x20--7F denotes the corresponding ASCII character (from SPACE to DELETE); in particular, such a byte cannot be part of a multi-byte character. Note that the ASCII control codes 0x00--1F are not included here, as they are used for special purposes in some encodings. If an encoding has this property, it is easy to search for occurences of ASCII characters within strings of this encoding---you do not need to keep track whether a byte in the range 0x20--7F really represents an ASCII character or rather is part of some multi-byte character. The guarantees when mapping between Unicode and a given encoding with the ASCII property are as follows: When mapping from Unicode to the given encoding, U+0020--007F map to 0x20--7F (but there can also be other Unicode characters mapping into the range 0x20--7F), and when mapping from the given encoding to Unicode, 0x20--7F map to U+0020--007F (again, there can also be other characters mapping into the range U+0020--007F). In particular, this ensures round-trip conversion for the ASCII range. In principle, the ASCII property is orthogonal to the CONTEXT property. In practice, however, an encoding that has the ASCII property will most likely not also have the CONTEXT property. RTL_TEXTENCODING_INFO_UNICODE: The encoding is based on the Unicode character repertoire. RTL_TEXTENCODING_INFO_MULTIBYTE: A multi-byte encoding. RTL_TEXTENCODING_INFO_R2L: An encoding used mainly or exclusively for languages written from right to left. RTL_TEXTENCODING_INFO_7BIT: A 7-bit instead of an 8-bit encoding. RTL_TEXTENCODING_INFO_SYMBOL: A (generic) encoding for symbol character sets. RTL_TEXTENCODING_INFO_MIME: The encoding is registered as a MIME charset.
Top of Page
Copyright © 2012, The Apache Software Foundation, Licensed under the Apache License, Version 2.0. Apache, the Apache feather logo, Apache OpenOffice and OpenOffice.org are trademarks of The Apache Software Foundation. Other names may be trademarks of their respective owners.