Make read_utf8(), like read_sbcs(), accessible to the rest of the library,
[sgt/charset] / iso2022.c
index e88f9e7..642475c 100644 (file)
--- a/iso2022.c
+++ b/iso2022.c
@@ -15,7 +15,8 @@
  * sets are passed through, so a post-processor could fix them up if
  * necessary.
  *
- * DOCS is not currently supported.  It will be one day.
+ * DOCS to UTF-8 works.  Other DOCS sequences are ignored, which will
+ * produce surprising results.
  */
 
 #ifndef ENUM_CHARSETS
@@ -143,8 +144,7 @@ static void do_utf8(long int input_chr,
 
     ustate.s1 = 0;
     ustate.s0 = state->s0 & 0x03ffffffL;
-    utf8 = charset_find_spec(CS_UTF8);
-    utf8->read(utf8, input_chr, &ustate, emit, emitctx);
+    read_utf8(NULL, input_chr, &ustate, emit, emitctx);
     state->s0 = (state->s0 & ~0x03ffffffL) | (ustate.s0 & 0x03ffffffL);
 }