swirl
Guide to OmniMark 7   OmniMark home
docs home 
IndexConceptsTasksSyntaxLibrariesLegacy LibrariesErrors
 
  Related Syntax     Other Library Functions  
function  

utf16.reader

 
 

Library: Character encodings, UTF-16 (OMFFUTF16)
Import: omffutf16.xmd
Return type: Source
Returns: 

A scannable input source for streaming data.


Declaration

  export external source function reader
                    from value source input-data


Purpose

Use reader to read a value source, its argument, and return the text of that file 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.

Usage Note

To use omffutf16, you must import it into your program using a statement like this:

  import "omffutf16.xmd" prefixed by utf16.

(Please see the import topic for more on importing.)

Example


  ; Copy 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 default) on the
  ; output file.
  import "omffutf16.xmd" prefixed by utf16.
  process
     set file #args [2] to file utf16.reader from #args [1]

    Related Syntax
   utf16.writer
 
  Other Library Functions
   utf16.reader
   utf16.writer
 
 

Top [ INDEX ] [ CONCEPTS ] [ TASKS ] [ SYNTAX ] [ LIBRARIES ] [ LEGACYLIBRARIES ] [ ERRORS ]

OmniMark 7.1.2 Documentation Generated: June 28, 2005 at 5:45:57 pm
If you have any comments about this section of the documentation, send email to [email protected]

Copyright © Stilo Corporation, 1988-2005.