swirl
Guide to OmniMark 8   OmniMark home
docs home 
IndexConceptsTasksSyntaxLibrariesLegacy LibrariesErrors
 
Functions       Platforms  
 

UTF-8 (OMUTF8)

 
 

The UTF-8 encoding library allows you to process data files that contain UTF-8 encoding.

You can use the pattern macro utf8.char to match UTF-8 characters in data.

You can use the pattern macro utf8.single-byte-char to match only ASCII UTF-8 characters in data.

You can use the pattern macro utf8.multi-byte-char to match only double-byte UTF-8 characters in data.

You can use the function utf8.code-point to convert a UTF-8 character (that is, a sequence of bytes that represents a character in UTF-8) to its binary character value.

You can use the function utf8.encoding to convert a binary character value to UTF-8 (that is, to that sequence of bytes which represents that character value in UTF-8).

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

Functions
   utf8.byte-order-mark
   utf8.char
   utf8.code-point
   utf8.encoding
   utf8.multi-byte-char
   utf8.omutf8-version
   utf8.single-byte-char
 
Platforms
   HP/UX
   HP-UX Itanium 2
   IBM AIX 5.3
   Linux (Intel)
   Linux Red Hat Enterprise 5
   MS Windows 98/ME
   MS Windows NT/2000/XP
   MS Windows Vista
   Sun Solaris 8
 
 

Top [ INDEX ] [ CONCEPTS ] [ TASKS ] [ SYNTAX ] [ LIBRARIES ] [ LEGACY LIBRARIES ] [ ERRORS ]

OmniMark 8.2.0 Documentation Generated: May 6, 2008 at 10:12:26 am
If you have any comments about this section of the documentation, please use this form.

Copyright © Stilo International plc, 1988-2008.