mirror of
https://github.com/reactos/reactos.git
synced 2025-08-06 11:53:16 +00:00
fix UTF8 conversion for the bookmarks list
svn path=/trunk/; revision=11775
This commit is contained in:
parent
dd1feec678
commit
178f3ae085
1 changed files with 6 additions and 2 deletions
|
@ -234,8 +234,8 @@ inline void assign_utf8(XS_String& s, const char* str)
|
||||||
inline std::string get_utf8(LPCTSTR s, int l)
|
inline std::string get_utf8(LPCTSTR s, int l)
|
||||||
{
|
{
|
||||||
#ifdef UNICODE
|
#ifdef UNICODE
|
||||||
LPSTR buffer = (LPSTR)alloca(l);
|
int bl=2*l; LPSTR buffer = (LPSTR)alloca(bl);
|
||||||
l = WideCharToMultiByte(CP_UTF8, 0, s, l, buffer, l, 0, 0);
|
l = WideCharToMultiByte(CP_UTF8, 0, s, l, buffer, bl, 0, 0);
|
||||||
#else
|
#else
|
||||||
LPWSTR wbuffer = (LPWSTR)alloca(sizeof(WCHAR)*l);
|
LPWSTR wbuffer = (LPWSTR)alloca(sizeof(WCHAR)*l);
|
||||||
l = MultiByteToWideChar(CP_ACP, 0, s, l, wbuffer, l);
|
l = MultiByteToWideChar(CP_ACP, 0, s, l, wbuffer, l);
|
||||||
|
@ -1629,7 +1629,11 @@ struct XMLDoc : public XMLNode
|
||||||
tifstream in(path);
|
tifstream in(path);
|
||||||
XMLReader reader(this, in);
|
XMLReader reader(this, in);
|
||||||
|
|
||||||
|
//#if defined(_STRING_DEFINED) && !defined(XS_STRING_UTF8)
|
||||||
|
// return read(reader, std::string(ANS(path)));
|
||||||
|
//#else
|
||||||
return read(reader, XS_String(path));
|
return read(reader, XS_String(path));
|
||||||
|
//#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
bool read(XMLReaderBase& reader)
|
bool read(XMLReaderBase& reader)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue