texinfo-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[6346] parsetexi don't set utf-8 flag for text in tree yet


From: Gavin D. Smith
Subject: [6346] parsetexi don't set utf-8 flag for text in tree yet
Date: Fri, 19 Jun 2015 18:09:35 +0000

Revision: 6346
          http://svn.sv.gnu.org/viewvc/?view=rev&root=texinfo&revision=6346
Author:   gavin
Date:     2015-06-19 18:09:34 +0000 (Fri, 19 Jun 2015)
Log Message:
-----------
parsetexi don't set utf-8 flag for text in tree yet

Modified Paths:
--------------
    trunk/parsetexi/api.c
    trunk/parsetexi/input.c

Modified: trunk/parsetexi/api.c
===================================================================
--- trunk/parsetexi/api.c       2015-06-19 12:31:52 UTC (rev 6345)
+++ trunk/parsetexi/api.c       2015-06-19 18:09:34 UTC (rev 6346)
@@ -226,7 +226,17 @@
         hv_store (e->hv, "text", strlen ("text"), sv, 0);
       else
         hv_store (e->hv, "type", strlen ("type"), sv, 0);
-      SvUTF8_on (sv);
+
+      //SvUTF8_on (sv);
+      /* We will have to do something like that, but first we need to make 
sure 
+         the strings we have are in UTF-8 to start with.  This would lead to 
an 
+         unnecessary round trip with "@documentencoding ISO-8859-1" for Info 
+         and plain text output, when we first convert the characters in the 
+         input file to UTF-8, and convert them back again for the output.
+      
+         The alternative is to leave the UTF-8 flag off, and hope that Perl 
+         interprets 8-bit encodings like ISO-8859-1 correctly.  See
+         "How does Perl store UTF-8 strings?" in "man perlguts". */
     }
 
   if (e->extra_number > 0)

Modified: trunk/parsetexi/input.c
===================================================================
--- trunk/parsetexi/input.c     2015-06-19 12:31:52 UTC (rev 6345)
+++ trunk/parsetexi/input.c     2015-06-19 18:09:34 UTC (rev 6346)
@@ -128,6 +128,9 @@
               if (comment)
                 *comment = '\n';
 
+              /* TODO: convert from @documentencoding to UTF-8, assuming we 
+                 want to use UTF-8 internally. */
+
               // 1920 CPP_LINE_DIRECTIVES
 
               line_nr.line_nr++;




reply via email to

[Prev in Thread] Current Thread [Next in Thread]