]> granicus.if.org Git - vim/commitdiff
updated for version 7.1-079 v7.1.079
authorBram Moolenaar <Bram@vim.org>
Wed, 15 Aug 2007 18:41:34 +0000 (18:41 +0000)
committerBram Moolenaar <Bram@vim.org>
Wed, 15 Aug 2007 18:41:34 +0000 (18:41 +0000)
src/charset.c
src/macros.h
src/version.c

index 8f058bde0ae776b308b2617ee3982cb4586cdcff..5a2952cd6c4eb6e9ae24853ae7d61d8cb883ecde 100644 (file)
@@ -207,7 +207,10 @@ buf_init_chartab(buf, global)
            }
            while (c <= c2)
            {
-               if (!do_isalpha || isalpha(c)
+               /* Use the MB_ functions here, because isalpha() doesn't
+                * work properly when 'encoding' is "latin1" and the locale is
+                * "C".  */
+               if (!do_isalpha || MB_ISLOWER(c) || MB_ISUPPER(c)
 #ifdef FEAT_FKMAP
                        || (p_altkeymap && (F_isalpha(c) || F_isdigit(c)))
 #endif
index 400f771281b7e3826ce879238d2e3be451f045f3..f2230995968ff341a5a7d04a012e466194e12a58 100644 (file)
 
 /*
  * toupper() and tolower() that use the current locale.
- * On some systems toupper()/tolower() only work on lower/uppercase characters
+ * On some systems toupper()/tolower() only work on lower/uppercase
+ * characters, first use islower() or isupper() then.
  * Careful: Only call TOUPPER_LOC() and TOLOWER_LOC() with a character in the
  * range 0 - 255.  toupper()/tolower() on some systems can't handle others.
- * Note: for UTF-8 use utf_toupper() and utf_tolower().
+ * Note: It is often better to use MB_TOLOWER() and MB_TOUPPER(), because many
+ * toupper() and tolower() implementations only work for ASCII.
  */
 #ifdef MSWIN
 #  define TOUPPER_LOC(c)       toupper_tab[(c) & 255]
index 5f8faf875bc08699e21347bba3f5433a7a414f08..11d944352477d5906b486267dfad443a0b258a50 100644 (file)
@@ -666,6 +666,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    79,
 /**/
     78,
 /**/