|
|||||
|
|||||
Related Syntax | |||||
pattern |
utf8.multi-byte-char |
Syntax
utf8.multi-byte-char
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 |