Win 98 VFS Fixes (by BirdFlu)

- add ini option to disable UNICODE in VFS (and use the current codepage)
- when UNICODE disabled in VFS, open files with default encoding (instead of UTF8/16) filenames


git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@3118 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
Wanne
2009-07-20 08:14:37 +00:00
parent 98507b972b
commit 06a2af0fa6
8 changed files with 191 additions and 32 deletions
+10 -3
View File
@@ -51,11 +51,18 @@ public:
static utf8string::str_t as_utf16(std::string const& str);
static void as_utf16(std::string const& str, utf8string::str_t &str16);
// fast conversion without creating an internal copy
static std::string as_utf8(utf8string const& str);
static std::string as_utf8(std::wstring const& str);
static std::string as_utf8(utf8string const& str);
static std::string as_utf8(std::wstring const& str);
// if 'strlen' is 0, length is determined automatically
static std::string as_utf8(const wchar_t* str, unsigned int strlength=0);
static std::string as_utf8(const wchar_t* str, unsigned int strlength=0);
//
static std::string narrow(wchar_t const* str, size_t length);
static size_t narrow(wchar_t const* src_str, size_t src_len, char* dst_str, size_t dst_len);
static size_t narrow(std::wstring const& src, std::string& dst);
//
static std::wstring widen(char const* str, size_t length);
static size_t widen(char const* src_str, size_t src_len, wchar_t* dst_str, size_t dst_len);
static size_t widen(std::string const& src, std::wstring& dst);
// convenience method, for the case it should be used in generic code (overloading)
static std::string as_utf8(std::string const& str);