From: Paul Ramsey Date: Thu, 15 Nov 2012 00:15:24 +0000 (+0000) Subject: Comment on the dump_toupper function X-Git-Tag: 2.1.0beta2~393 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=655f655c73b078229a8707762ce13ad5530da5fb;p=postgis Comment on the dump_toupper function git-svn-id: http://svn.osgeo.org/postgis/trunk@10680 b70326c6-7e19-0410-871a-916f4a2858ee --- diff --git a/liblwgeom/g_util.c b/liblwgeom/g_util.c index ac52d4baa..84feecc2d 100644 --- a/liblwgeom/g_util.c +++ b/liblwgeom/g_util.c @@ -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)