iso8859.reader

function

Library: ISO/IEC 8859 (OMFF8859)
Import : omff8859.xmd

Returns: A scannable input source for streaming data.


Declaration
export string source function 
   reader   in value encoding-type encoding   optional 
          from value string source input-data
    


Purpose

Use reader to read a string source and return the text of that source converted from an ISO/IEC 8859 encoding to a UTF-8 encoding. So, although the provided source is in one of the ISO/IEC 8859 encodings, the program sees UTF-8.

If the source input-data contains a byte that is an unused code point in the selected encoding, that byte will be suppressed. The unused code points are

Example

The following example converts a file from ISO/IEC 8859-5 to UTF-8 for further processing by find rules:

  import "omff8859.xmd" prefixed by iso8859.
  
  
  process
     using group "process input"
        submit iso8859.reader in iso8859.encoding-8859-5 from file #args[1]
  
  
  group "process input"
     ; ...

Related Topics
Other Library Functions