import java.util.logging.Logger;
import java.util.logging.FileHandler;
import java.util.logging.SimpleFormatter;
import java.util.logging.Level;
logger = Logger.getLogger("com.mycompany.conversion"); // logger internal name
FileHandler fileHandler = new FileHandler("basic.conversion.txt", 1000, 1);
fileHandler.setFormatter(new SimpleFormatter());
logger.addHandler(fileHandler);
logger.log(Level.INFO, " Initializing GgWebService");
See also:
C:\Program Files\Java\jdk1.6.0_10\jre\lib\logging.properties
.
Sunday, November 30, 2008
Friday, November 21, 2008
Strings
string is an alias for String
String: UTF16
UTF16
wchar_t: UTF16 on Windows, UTF32 on Unix
wchar_t is not portable, better to use ICU instead.
typedef basic_string < char > string;
typedef basic_string < wchar_t > wstring;
wstring string1 = L"obecnÄ›";
UnicodeString: UTF16 internally. Note that the endianess of UTF-16 is platform dependent.
ICU does not use UCS-2. UCS-2 is a subset of UTF-16. UCS-2 does not support surrogates, and UTF-16 does support surrogates.
#ifdef UNICODE
typedef wchar_t TCHAR;
#else
typedef char TCHAR;
#endif
TCHAR * toto = _T("obecnÄ›");
Subscribe to:
Posts (Atom)