]> mj.ucw.cz Git - libucw.git/commitdiff
Fixed bug in generating UTF-8 for codes >= 0x800.
authorMartin Mares <mj@ucw.cz>
Thu, 1 Mar 2001 17:31:47 +0000 (17:31 +0000)
committerMartin Mares <mj@ucw.cz>
Thu, 1 Mar 2001 17:31:47 +0000 (17:31 +0000)
charset/charconv.c

index c5d3717b65cfa8c62281dc21e765cb077ebf83ad..996495cac0cda6ad26bc5f56332865590da1c5f5 100644 (file)
@@ -181,7 +181,7 @@ conv_to_utf8(struct conv_context *c)
        {
          if (d + 3 > de)
            goto dend;
-         *d++ = 0xc0 | (code >> 12);
+         *d++ = 0xe0 | (code >> 12);
          *d++ = 0x80 | ((code >> 6) & 0x3f);
          *d++ = 0x80 | (code & 0x3f);
        }