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

big5.writer

 
 

Library: Big5 (OMFFBIG5)
Import: omffbig5.xmd
Return type: String sink

Returns: A writable output target for streaming data.


Declaration

export external string sink function writer
                  into value string sink output-data


Purpose

Use writer to accept UTF-8 encoded data and write that data to a value string sink, its first argument, converted from a UTF-8 encoding to a Big5 encoding. That is, the program writes UTF-8, but the provided output receives Big5.

Usage Note

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

  import "omffbig5.xmd" prefixed by big5.

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

Example


  ; Establish a Big Five-encoded file named by the first
  ; command-line argument as the  #current-output  of the program.
  ; Convert any data written to #current-output  to Big Five
  ; prior to it being written to the file.
  import "omffbig5.xmd" prefixed by big5.
  global stream output-file
  process-start
     open output-file as big5.writer into file #args [1]
     output-to output-file

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

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

OmniMark 8.2.0 Documentation Generated: March 13, 2008 at 3:27:39 pm
If you have any comments about this section of the documentation, please use this form.

Copyright © Stilo International plc, 1988-2008.