|
|||||
|
||||||
Related Syntax | Other Library Functions |
function |
big5.reader |
Library: Big5 (OMFFBIG5)
Import: omffbig5.xmd |
Return type: String source Returns: A scannable input source for streaming data. |
export external string source function reader from value string source input-data
Use reader
to read a value string source, its argument, and return the text of that file converted from a Big 5 encoding to a UTF-8 encoding. That is, the provided source is in Big 5, but the program sees UTF-8
To use reader
, you must import omffbig5.xmd
into your program using a statement like this:
import "omffbig5.xmd" prefixed by big5.
(Please see the import
topic
for more on importing.)
; Scan the Big Five-encoded file named by the first ; command-line argument to the program's find rules, ; converting from Big Five to UTF-8 prior to the match ; alternatives seeing the data: import "omffbig5.xmd" prefixed by big5. process repeat scan big5.reader from file #args [1] match ["%0#" to "%127"]+ => plain-ascii output plain-ascii match (any ["%128#" to "#255#"]+) => utf-8-code ; process utf-8-code again
Related Syntax big5.writer |
Other Library Functions big5.reader big5.writer |
Copyright © Stilo International plc, 1988-2008.