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

utf8.multi-byte-char

 
 

Library: UTF-8 (OMUTF8)
Import: omutf8.xmd

Declaration

utf8.multi-byte-char


Purpose

You can use utf8.multi-byte-char as a pattern to match only multi-byte UTF-8 encoded characters (those with numeric values greater than 128) in your input data.

You can use this pattern in a find rule when you want to process only the multi-byte UTF-8 characters, and let the single-byte UTF-8 characters fall through as unmatched characters do in OmniMark find rules.

Example:


  import "omutf8.xmd" prefixed by utf8.
    process
    repeat scan "flamb%195#%169#"
         match utf8.single-byte-char+ => c
              output c
         match utf8.multi-byte-char => c
              local integer n initial {utf8.code-point of c}
              do when n > 255
                   output "&#x" || "16rud" % n || ";"
              else
                   output "b" % n
              done
      again

For other related constants and keywords, see the UTF-8 text processing library.

    Related Syntax
   utf8.char
   utf8.single-byte-char
 
  Other Library Functions
   utf8.byte-order-mark
   utf8.char
   utf8.code-point
   utf8.encoding
   utf8.multi-byte-char
   utf8.omutf8-version
   utf8.single-byte-char
 
 

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.