Log Message:
-----------
require unicode to compile utffile.cpp
Modified Files:
--------------
pgadmin3/src/utils:
utffile.cpp (r1.9 -> r1.10)
Index: utffile.cpp
===================================================================
RCS file: /projects/pgadmin3/src/utils/utffile.cpp,v
retrieving revision 1.9
retrieving revision 1.10
diff -Lsrc/utils/utffile.cpp -Lsrc/utils/utffile.cpp -u -w -r1.9 -r1.10
--- 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,12 +87,7 @@
if (decr)
Seek(-decr, wxFromCurrent);
-#if wxUSE_UNICODE
- size_t buf_len = nLen;
-#else
- size_t buf_len = nLen * sizeof(wchar_t);
-#endif
- m_conversion->MB2WC((wchar_t*)(wxChar*)wxStringBuffer(str,
buf_len), (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;
---------------------------(end of broadcast)---------------------------
TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]