Automatic generation produced by ISE Eiffel
class NATIVE_STRING General cluster: elks description: "Platform specific encoding of Unicode strings. By default, UTF-8 on unix or UTF-16 on Windows. Mixed-encoding consideration ============================ Most operating systems have conventions for strings that are incompatible with Unicode. On UNIX, a string is just a null-terminated byte sequence, it does not follow any specific encoding. Usually the locale setting enables you to see the string the way you expect. On Windows, the sequence of names is made of null-terminated UTF-16 code unit sequence. Windows does not guarantee that the sequence is actually a valid UTF-16 sequence. In other words, when there is an invalid UTF-8 encoding on UNIX, or an invalid UTF-16 encoding on Windows, the string is not directly representable as a Unicode string. To make it possible to create and store strings in a textually representable form, the query string will create an encoded representation that can be then later used in make to create a NATIVE_STRING equivalent to the original string. The encoding is described in UTF_CONVERTER's note clause and is a fourth variant of the recommended practice for replacement characters in Unicode (see http://www.unicode.org/review/pr-121.html). " create: make, make_empty, make_from_pointer, make_from_raw_string Ancestors NATIVE_STRING_HANDLER Queries bytes_count: INTEGER_32 capacity: INTEGER_32 is_empty: BOOLEAN is_equal (other: [like Current] NATIVE_STRING): BOOLEAN item: POINTER managed_data: MANAGED_POINTER raw_string: STRING_8 string: STRING_32 substring (start_pos, end_pos: INTEGER_32): STRING_32 unit_count: INTEGER_32 unit_size: INTEGER_32 Commands set_shared_from_pointer (a_ptr: POINTER) set_shared_from_pointer_and_count (a_ptr: POINTER; a_length: INTEGER_32) set_string (a_string: READABLE_STRING_GENERAL) set_substring (a_string: READABLE_STRING_GENERAL; start_pos, end_pos: INTEGER_32) Constraints little endian windows even count on windows -- Generated by Eiffel Studio --
For more details: eiffel.org