gnunet-svn
[Top][All Lists]
Advanced

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

[GNUnet-SVN] r256 - Extractor/src/plugins


From: durner
Subject: [GNUnet-SVN] r256 - Extractor/src/plugins
Date: Sun, 13 Feb 2005 03:32:39 -0800 (PST)

Author: durner
Date: 2005-02-13 03:32:38 -0800 (Sun, 13 Feb 2005)
New Revision: 256

Modified:
   Extractor/src/plugins/translitextractor.c
Log:
Two new french chars, Euro sign and bugfix for 2- and 3-byte UTF-8 chars

Modified: Extractor/src/plugins/translitextractor.c
===================================================================
--- Extractor/src/plugins/translitextractor.c   2005-02-13 07:35:44 UTC (rev 
255)
+++ Extractor/src/plugins/translitextractor.c   2005-02-13 11:32:38 UTC (rev 
256)
@@ -81,7 +81,7 @@
   {0x00D4, 423}, {0x00DB, 426}, {0x00E2, 431}, {0x00EA, 76}, /* �, �, �, � */
   {0x00EE, 80}, {0x00F4, 41}, {0x00FB, 5}, {0x00CB, 77}, /* �, �, �, � */
   {0x00CF, 63}, {0x00EB, 76}, {0x00EF, 80}, {0x00C7, 57}, /* �, �, �, � */
-  {0x00E7, 118}, /* � */
+  {0x00E7, 118}, {0x0152, 445}, {0x0053, 19}, {0x0080, 66}, /* �, �, �, � */
   
   /* Language independent */
   {0xFB00, 391}, {0xFB01, 392}, {0xFB02, 393}, {0xFB03, 394},
@@ -609,14 +609,14 @@
           /* 4 bits from the first byte and 6 bits from the second and third
              byte. 4096 = 2^12 */
           unicode = ((srcdata[src] & 0xF) * 4096) |
-            ((srcdata[src + 1] & 0x3F) * 256) | (srcdata[src + 2] & 0x3F);
+            ((srcdata[src + 1] & 0x3F) * 64) | (srcdata[src + 2] & 0x3F);
         }
         else if (charlen == 4) {
           /* 3 bits from the first byte and 6 bits from the second, third
              and fourth byte. 262144 = 2^18 */
           unicode = ((srcdata[src] & 7) * 262144) |
             ((srcdata[src] & 0xF) * 4096) |
-            ((srcdata[src + 1] & 0x3F) * 256) | (srcdata[src + 2] & 0x3F);
+            ((srcdata[src + 1] & 0x3F) * 64) | (srcdata[src + 2] & 0x3F);
         }
         
         /* Look it up */





reply via email to

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