MARC 8 encoding: never pass through ESC
authorAdam Dickmeiss <adam@indexdata.dk>
Wed, 10 Apr 2013 11:50:10 +0000 (13:50 +0200)
committerAdam Dickmeiss <adam@indexdata.dk>
Wed, 10 Apr 2013 11:50:10 +0000 (13:50 +0200)
as it is also uesd as escape for MARC-8 itself.

src/iconv_encode_marc8.c

index cfdd1be..e05874f 100644 (file)
@@ -72,7 +72,7 @@ static unsigned long lookup_marc8(yaz_iconv_t cd,
     size_t utf8_outbytesleft = sizeof(utf8_buf)-1, r;
     int error_code;
 
-    if (x <= ' ')
+    if (x <= ' ' && x != 27)
     {
         *page_chr = ESC "(B";
         return x;