[sword-svn] r1758 - trunk/src/mgr

dglassey at crosswire.org dglassey at crosswire.org
Mon Mar 28 13:16:44 MST 2005


Author: dglassey
Date: 2005-03-28 13:16:43 -0700 (Mon, 28 Mar 2005)
New Revision: 1758

Modified:
   trunk/src/mgr/localemgr.cpp
Log:
update setDefaultLocaleName comments to explain it a little better



Modified: trunk/src/mgr/localemgr.cpp
===================================================================
--- trunk/src/mgr/localemgr.cpp	2005-03-28 20:05:50 UTC (rev 1757)
+++ trunk/src/mgr/localemgr.cpp	2005-03-28 20:16:43 UTC (rev 1758)
@@ -234,8 +234,9 @@
 void LocaleMgr::setDefaultLocaleName(const char *name) {
 	char *tmplang=0;
 	stdstr(&tmplang, name);
+	// discard everything after '.' usually encoding e.g. .UTF-8
 	strtok(tmplang, ".");
-	// check for @ so e.g. @euro locales are found
+	// also discard after '@' so e.g. @euro locales are found
 	strtok(tmplang, "@");
 	// Before we set it we want to verify that it is an existing locale
 	// First check for what we ask for
@@ -252,6 +253,8 @@
 		}
 		else {
 			if (!defaultLocaleName) {
+				// make sure we have a default locale name
+				// even though the one asked for doesn't exist
 				stdstr(&defaultLocaleName, "en_US");
 			}
 



More information about the sword-cvs mailing list