Library: UTF-16 (OMFFUTF16)
Import : omffutf16.xmd

Returns: a scannable input source for streaming data

export external string source function 
   reader from value string source input-data


Use utf16.reader to read its value string source input-data argument and return the data converted from a UTF-16 encoding to a UTF-8 encoding. That is, the provided source is in UTF-16, but the program sees UTF-8.


The following example converts the file named by the first command-line argument to the file named by the second command-line argument, converting from UTF-16 encoding to UTF-8 encoding the output file.

  import "omffutf16.xmd" prefixed by utf16.
     set file #args[2] to utf16.reader from file #args[1]

Usage Note

To use utf16.reader, you must import OMFFUTF16 into your program using an import declaration such as:

  import "omffutf16.xmd" prefixed by utf16.

Other Library Functions