]> granicus.if.org Git - postgis/commitdiff
Comment on the dump_toupper function
authorPaul Ramsey <pramsey@cleverelephant.ca>
Thu, 15 Nov 2012 00:15:24 +0000 (00:15 +0000)
committerPaul Ramsey <pramsey@cleverelephant.ca>
Thu, 15 Nov 2012 00:15:24 +0000 (00:15 +0000)
git-svn-id: http://svn.osgeo.org/postgis/trunk@10680 b70326c6-7e19-0410-871a-916f4a2858ee

liblwgeom/g_util.c

index ac52d4baa816612bd6df3413be2006f76fd0f7da..84feecc2d4f9ee0a6664b19cdee8e7f7b96dc452 100644 (file)
@@ -112,6 +112,13 @@ struct geomtype_struct geomtype_struct_array[] =
 };
 #define GEOMTYPE_STRUCT_ARRAY_LEN (sizeof geomtype_struct_array/sizeof(struct geomtype_struct))
 
+/*
+* We use a very simple upper case mapper here, because the system toupper() function
+* is locale dependent and may have trouble mapping lower case strings to the upper
+* case ones we expect (see, the "Turkisk I", http://www.i18nguy.com/unicode/turkish-i18n.html)
+* We could also count on PgSQL sending us *lower* case inputs, as it seems to do that
+* regardless of the case the user provides for the type arguments.
+*/
 const char dumb_upper_map[128] = "................................................0123456789.......ABCDEFGHIJKLMNOPQRSTUVWXYZ......ABCDEFGHIJKLMNOPQRSTUVWXYZ.....";
 
 static char dump_toupper(int in)