function
Library: Big5 (OMFFBIG5)
Import : omffbig5.xmd |
Returns: A writable output target for streaming data. |
export external string sink function writer into value string sink output-data
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.
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.)
; 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