If you can add a option to state a fixed locale character encoding and set a corresponding macro in log4cxx/private/log4cxx.h, that would be great. That way if you knew that you were only going to be deploying where the locale character encoding was UTF-8, then conversion from locale charset to internal charset could just just memcpy's.

Something like --ctype=UTF-8 would get translated as

#define LOG4CXX_LOCALE_ENCODING_UTF8 1

The other possible recognized values would be US-ASCII and ISO-8859-1. Anything else would not be recognized and would require calling mbstowbs and then encoding as UTF-8.

Since most Linux distributions are UTF-8 now, perhaps it would be good that the default was fixed UTF-8 and you have to explicitly specify when you wanted to follow the locale declared encoding.

I don't know the conventions, I'll rely on your judgment or you can provide whatever examples for similar configurations you can find.



On May 7, 2005, at 12:06 AM, Curt Arnold wrote:


About this, I have a problem with some ac variables you use in log4cxx.h.in
but which are not set by configure.in :
LOGCHAR_IS_UTF8 and HAS_WCHAR_T
How do you expect them to be defined ? Do I add some option to configure of do
I compute it from --enable-unicode ?



Reply via email to