Date: Friday, January 26, 2007 @ 15:04:18
  Author: marc
    Path: /cvsroot/carob/carob/doc

   Added: locales (1.1)

First import


---------+
 locales |   90 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 90 insertions(+)


Index: carob/doc/locales
diff -u /dev/null carob/doc/locales:1.1
--- /dev/null   Fri Jan 26 15:04:18 2007
+++ carob/doc/locales   Fri Jan 26 15:04:18 2007
@@ -0,0 +1,90 @@
+Why locales
+~~~~~~~~~~~
+
+Carob is using locales for two reasons:
+
+1. To encode output (mainly: log messages) according to the user
+   preference, just like any well-behaved application. See
+   Common.cpp and StringCodecs.cpp
+
+2. As the default option to get an UTF-8 codec to communicate with
+   controllers. This is quite standard and portable but may fail
+   on some platforms, so it can be disabled and replaced at
+   compile-time by CPPFLAGS=-DCAROB_USE_ICONV, at the (low) price
+   of a POSIX iconv dependency. See JavaSocket.cpp, CAROB-79 and
+   related.
+
+
+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.
+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.
+
+
+Caveats
+~~~~~~~
+
+FreeBSD does not support named locales. Probably the same for others
+systems using GNU g++ but NOT GNU libc. To investigate.
+  <http://gcc.gnu.org/ml/libstdc++/2003-02/msg00350.html>
+
+This seems to be because of concerns from the g++ guys, worried about
+the thread safety of non-GNU libc. To investigate.
+
+
+
+Build/Install a new locale
+~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+* "Old" debian-based distros
+
+# dpkg-reconfigure locales
+
+
+* "New" debian-based distros
+
+The above command does only a rebuild; no re-configuration.
+Configuration has now moved to the non-interactive "locale-gen" tool.
+
+# locale-gen <locale from /usr/share/i18n/SUPPORTED>
+For instance: # locale-gen [EMAIL PROTECTED]
+
+For more details check man locale-gen and
+http://ubuntuguide.org/wiki/Ubuntu_Edgy#How_to_add_locales_to_Ubuntu_the_command_line_way
+
+
+* The hard way with POSIX' "localedef" (See opengroup.org)
+
+# cd /usr/share/i18n 
+# ls locales/ 
+   fr_FR ... 
+# ls charmaps/ 
+   ISO-8859-5.gz ... 
+# localedef -i fr_FR -f ISO-8859-15 my.locale 
+# locale -a 
+   my.locale ... 
+# export LANG=my.locale 
+
+
+A SuSE localedef example:
+<http://www.google.com/search?q=SUSE+LINUX+Language+and+Country-Specific+Settings++localedef>
+
+
+
+References
+----------
+
+"UTF-8 and Unicode FAQ for Unix/Linux" by Markus Kuhn
+<http://www.cl.cam.ac.uk/~mgk25/unicode.html>
+
+"Roman Czyborra"
+http://czyborra.com/
+
+"Solaris en_US.UTF-8 Locale Support Overview"
+
+"Multibyte Conversions" from Dinkumware
+<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

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

Reply via email to