This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH] Fix incompatible quote handling


This patch fixes the quote misfeature for me to PR18229. It just
uses normal ASCII quotes that always work on all terminals. 
Resulting code is shorter too and should work in all environments
unlike the old code.

Please consider comitting (I don't have CVS access) 

2004-10-30 Andi Kleen <ak@suse.de>

        PR c/18229
		* intl.c: gcc_init_libintl: Remove UTF-8 special case for 
		untranslated quotes.

Index: gcc/intl.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/intl.c,v
retrieving revision 1.11
diff -u -u -p -r1.11 intl.c
--- gcc/intl.c	23 Jul 2004 06:59:34 -0000	1.11
+++ gcc/intl.c	30 Oct 2004 15:26:35 -0000
@@ -59,27 +59,6 @@ gcc_init_libintl (void)
 
   /* Closing quotation mark.  */
   close_quote = _("'");
-
-  if (!strcmp (open_quote, "`") && !strcmp (close_quote, "'"))
-    {
-#if defined HAVE_LANGINFO_CODESET
-      const char *encoding;
-#endif
-      /* Untranslated quotes that it may be possible to replace with
-	 U+2018 and U+2019; but otherwise use "'" instead of "`" as
-	 opening quote.  */
-      open_quote = "'";
-#if defined HAVE_LANGINFO_CODESET
-      encoding = nl_langinfo (CODESET);
-      if (encoding != NULL
-	  && (!strcasecmp (encoding, "utf-8")
-	      || !strcasecmp (encoding, "utf8")))
-	{
-	  open_quote = "\xe2\x80\x98";
-	  close_quote = "\xe2\x80\x99";
-	}
-#endif
-    }
 }
 
 #if defined HAVE_WCHAR_H && defined HAVE_WORKING_MBSTOWCS && defined HAVE_WCSWIDTH


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]