ecere/com/unicode: ISO8859_1toUTF8() -- Treating 150 as U+2012 (Figure Dash)
authorJerome St-Louis <jerome@ecere.com>
Mon, 30 Sep 2013 07:41:43 +0000 (03:41 -0400)
committerJerome St-Louis <jerome@ecere.com>
Mon, 30 Sep 2013 08:06:57 +0000 (04:06 -0400)
compiler/bootstrap/ecere/bootstrap/instance.c
ecere/src/com/instance.ec

index 690b2a2..fd5c073 100644 (file)
@@ -5738,6 +5738,12 @@ for(c = 0; source[c]; c++)
 {
 unsigned int ch = ((unsigned char *)source)[c];
 
+switch(ch)
+{
+case 150:
+ch = 0x2012;
+break;
+}
 if(ch < 0x80)
 {
 if(d + 1 >= max)
index d74ad02..622b6ec 100644 (file)
@@ -6582,6 +6582,10 @@ public int ISO8859_1toUTF8(char * source, char * dest, int max)
    for(c = 0; source[c]; c++)
    {
       unichar ch = ((byte *)source)[c];
+      switch(ch)
+      {
+         case 150: ch = (unichar)0x2012; break;
+      }
       if(ch < 0x80)
       {
          if(d + 1 >= max) break;