Merge pull request #42 from ffontaine/master

fix build without wchar
diff --git a/src/main/cpp/odbcappender.cpp b/src/main/cpp/odbcappender.cpp
index 6bfa519..218df13 100644
--- a/src/main/cpp/odbcappender.cpp
+++ b/src/main/cpp/odbcappender.cpp
@@ -357,10 +357,12 @@
 	}
 }
 
+#if LOG4CXX_WCHAR_T_API || LOG4CXX_LOGCHAR_IS_WCHAR_T || defined(WIN32) || defined(_WIN32)
 void ODBCAppender::encode(wchar_t** dest, const LogString& src, Pool& p)
 {
 	*dest = Transcoder::wencode(src, p);
 }
+#endif
 
 void ODBCAppender::encode(unsigned short** dest,
 	const LogString& src, Pool& p)
diff --git a/src/main/include/log4cxx/db/odbcappender.h b/src/main/include/log4cxx/db/odbcappender.h
index a26bc35..fdc144f 100644
--- a/src/main/include/log4cxx/db/odbcappender.h
+++ b/src/main/include/log4cxx/db/odbcappender.h
@@ -300,8 +300,10 @@
 	private:
 		ODBCAppender(const ODBCAppender&);
 		ODBCAppender& operator=(const ODBCAppender&);
+#if LOG4CXX_WCHAR_T_API || LOG4CXX_LOGCHAR_IS_WCHAR_T || defined(WIN32) || defined(_WIN32)
 		static void encode(wchar_t** dest, const LogString& src,
 			log4cxx::helpers::Pool& p);
+#endif
 		static void encode(unsigned short** dest, const LogString& src,
 			log4cxx::helpers::Pool& p);
 }; // class ODBCAppender