Date: Wednesday, January 31, 2007 @ 15:06:02
  Author: marc
    Path: /cvsroot/carob/carob

Modified: doc/locales (1.2 -> 1.3) make-includes/darwinports-os.mk (1.5 ->
          1.6) src/JavaSocket.cpp (1.87 -> 1.88)

Additional comments.


---------------------------------+
 doc/locales                     |   19 +++++++++++++++----
 make-includes/darwinports-os.mk |    5 ++++-
 src/JavaSocket.cpp              |   13 ++++++++++++-
 3 files changed, 31 insertions(+), 6 deletions(-)


Index: carob/doc/locales
diff -u carob/doc/locales:1.2 carob/doc/locales:1.3
--- carob/doc/locales:1.2       Fri Jan 26 15:15:40 2007
+++ carob/doc/locales   Wed Jan 31 15:06:02 2007
@@ -17,9 +17,11 @@
 
 Note: carob is heavily using "wchar_t" and "std::wstring". wchar_t
 does NOT need to be a unicode even if this is the most common case.
+It may even be locale-dependent. 
+<http://www.dinkumware.com/manuals/?manual=compleat&page=multibyte.html#Wide-Character
 Encodings>
 Carob is supposed to be 100% portable to NON-unicode wchar_t systems
-(typically japanese), as long as it can find an appropriate
-wchar_t/UTF-8 codec to communicate with the controller.
+(e.g., X0208 or even some 8bit codeset), as long as it can find the
+appropriate wchar_t<->UTF-8 codec to communicate with the controller.
 
 
 Caveats
@@ -61,6 +63,7 @@
 For more details check man locale-gen and
 
http://ubuntuguide.org/wiki/Ubuntu_Edgy#How_to_add_locales_to_Ubuntu_the_command_line_way
 
+* Check the "FAQ Solaris locales"
 
 * The hard way with POSIX' "localedef" (See opengroup.org)
 
@@ -86,7 +89,7 @@
 "UTF-8 and Unicode FAQ for Unix/Linux" by Markus Kuhn
 <http://www.cl.cam.ac.uk/~mgk25/unicode.html>
 
-"Roman Czyborra"
+"Roman Czyborra's charsets resources"
 http://czyborra.com/
 
 "Solaris en_US.UTF-8 Locale Support Overview"
@@ -95,4 +98,12 @@
 <http://www.dinkumware.com/manuals/?manual=compleat&page=multibyte.html>
 
 GNU C Library Reference Manual ("info glibc")
-Chapter Locales and Internationalization 
\ No newline at end of file
+Chapter Locales and Internationalization 
+
+Enlightning discussion about C++ and locales in the real world
+(Windows, Solaris, linux...) A bit outdated but still extremely
+informative
+<http://groups.google.com/group/comp.lang.c++.moderated/browse_thread/thread/52e04cf87687243d/>
+
+is wchar_t unicode? Status for solaris and FreeBSD
+<http://mail.nl.linux.org/linux-utf8/2001-09/msg00076.html>
Index: carob/make-includes/darwinports-os.mk
diff -u carob/make-includes/darwinports-os.mk:1.5 
carob/make-includes/darwinports-os.mk:1.6
--- carob/make-includes/darwinports-os.mk:1.5   Mon Jan 29 18:11:59 2007
+++ carob/make-includes/darwinports-os.mk       Wed Jan 31 15:06:02 2007
@@ -13,7 +13,10 @@
 MK_CPPFLAGS += -DCAROB_USE_SELECT
 
 
-# named locales silently fail (fallback on POSIX?)
+# Named locales silently fail (fallback on POSIX?)  TODO: test again
+# with XCode > 1.1. For instance "locale -a" works on MacOSX >= 10.4
+# Maybe using locale named "" on 10.4 would provide an UTF-8 codec?
+
 MK_CPPFLAGS += -DCAROB_USE_ICONV -DCAROB_FORCE_UNICODE_WCHAR
 MK_LDLIBS   += -liconv
 
Index: carob/src/JavaSocket.cpp
diff -u carob/src/JavaSocket.cpp:1.87 carob/src/JavaSocket.cpp:1.88
--- carob/src/JavaSocket.cpp:1.87       Mon Jan 29 17:46:36 2007
+++ carob/src/JavaSocket.cpp    Wed Jan 31 15:06:02 2007
@@ -90,7 +90,18 @@
 
 namespace CarobNS { // tryUTF8locale() exported only for testing purposes
 
-  // TODO: add a *run-time* UTF8 locale definition option. See CAROB-74.
+  // TODO: add a *run-time* UTF8 locale definition option. See
+  //       CAROB-74 and related
+  // TODO: when available, should use POSIX'
+  //        compare(uppercase(nl_langinfo(CODESET)), "UTF-?8")
+
+  // For windows we may:
+  // - try codecvt_byname(".65001")
+  // - implement our own codecvt on top of
+  //     MultiByteToWideChar(CP_UTF8,...) like this:
+  //     
http://groups.google.com/group/comp.os.ms-windows.programmer.win32/browse_thread/thread/257dc6357fbc6b48/6d448d9e36c89514
+  // - use iconv...
+
   std::locale tryUTF8locale()
   {
     // __func__ is unfortunately C99

_______________________________________________
Carob-commits mailing list
[email protected]
https://forge.continuent.org/mailman/listinfo/carob-commits

Reply via email to