1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-01-18 13:12:50 +00:00
OpenMW/components/to_utf8/to_utf8.hpp

31 lines
841 B
C++
Raw Normal View History

#ifndef COMPONENTS_TOUTF8_H
#define COMPONENTS_TOUTF8_H
#include <string>
namespace ToUTF8
{
// These are all the currently supported code pages
enum FromType
{
WINDOWS_1250, // Central ane Eastern European languages
WINDOWS_1251, // Cyrillic languages
WINDOWS_1252 // Used by English version of Morrowind (and
// probably others)
};
// Return a writable buffer of at least 'size' bytes. The buffer
// does not have to be freed.
char* getBuffer(int size);
// Convert the previously written buffer to UTF8 from the given code
// page.
std::string getUtf8(FromType from);
2012-09-23 22:20:18 +04:00
std::string getLegacyEnc(FromType to);
2012-12-23 23:23:24 +04:00
FromType CalculateEncoding(const std::string& encodingName);
std::string EncodingUsingMessage(const std::string& encodingName);
}
#endif