Index: utffile.cpp =================================================================== RCS file: /projects/pgadmin3/src/utils/utffile.cpp,v retrieving revision 1.7.2.1 retrieving revision 1.7.2.2 diff -Lsrc/utils/utffile.cpp -Lsrc/utils/utffile.cpp -u -w -r1.7.2.1 -r1.7.2.2 --- src/utils/utffile.cpp +++ src/utils/utffile.cpp @@ -16,6 +16,10 @@ extern wxMBConvUTF32BE wxConvUTF32BE; extern wxMBConvUTF32LE wxConvUTF32LE; +#if !wxUSE_UNICODE +#error utffile.cpp is implemented for unicode only. +#endif + // these are the magic characters identifying an Unicode file #define BOM_UTF8 "\357\273\277" @@ -83,7 +87,7 @@ if (decr) Seek(-decr, wxFromCurrent); - m_conversion->MB2WC((wchar_t*)(wxChar*)wxStringBuffer(str, nLen), (const char*)buffer, (size_t)(nLen+1)); + m_conversion->MB2WC((wchar_t*)(wxChar*)wxStringBuffer(str, nLen+1), (const char*)buffer, (size_t)(nLen+1)); } else str = (wxChar*)buffer;