25 #ifndef COMMON_ENCODING_H 26 #define COMMON_ENCODING_H 33 class SeekableReadStream;
34 class MemoryReadStream;
152 #endif // COMMON_ENCODING_H
bool hasSupportEncoding(Encoding encoding)
Do we have support for this encoding?
A class holding an UTF-8 string.
UString getEncodingName(Encoding encoding)
Return the human readable name of an encoding.
size_t writeString(WriteStream &stream, const Common::UString &str, Encoding encoding, bool terminate)
Write a string into a stream with a given encoding.
UTF-16 LE (little endian).
size_t getBytesPerCodepoint(Encoding encoding)
Return the number of bytes per codepoint in this encoding.
UString readStringLine(SeekableReadStream &stream, Encoding encoding)
Read a line with the given encoding out of a stream.
Windows codepage 950 (Traditional Chinese, similar to Big5).
Low-level type definitions to handle fixed width types portably.
Plain, unextended ASCII (7bit clean).
Windows codepage 932 (Japanese, extended Shift-JIS).
Windows codepage 1250 (Eastern European, Latin alphabet).
UString readString(SeekableReadStream &stream, Encoding encoding)
Read a string with the given encoding of a stream.
Windows codepage 1251 (Eastern European, Cyrillic alphabet).
UString readStringFixed(SeekableReadStream &stream, Encoding encoding, size_t length)
Read length bytes as a string with the given encoding out of a stream.
Windows codepage 1252 (Western European, Latin alphabet).
bool isValidCodepoint(Encoding encoding, uint32 cp)
Return whether the given codepoint is valid in this encoding.
MemoryReadStream * convertString(const UString &str, Encoding encoding, bool terminateString)
Convert a string into the given encoding.
Windows codepage 949 (Korean, similar to EUC-KR).
Windows codepage 936 (Simplified Chinese, extended GB2312 with GBK codepoints).
void writeStringFixed(WriteStream &stream, const Common::UString &str, Encoding encoding, size_t length)
Write a string into a stream with a given encoding and fixed length in bytes.