swirl
Guide to OmniMark 9   OmniMark home
docs home 
IndexConceptsTasksSyntaxLibrariesLegacy LibrariesErrors
 
Functions    
 

Unicode (OMUNICODE)

 
 

The OMUNICODE library is based on Unicode Character Database. It provides functions that examine various Unicode character properties.

The functions in the OMUNICODE library work on individual character code points, which are independent of character encoding. You will probably need to convert a character from its input encoding to its code point before you can examine its properties. If your input is UTF-8 encoded, you can use utf8.code-point for that purpose. The following example outputs the code block of every input character, assuming that the input given to the program is UTF-8 encoded:

  import "omunicode.xmd" prefixed by unicode.
  import "omutf8.xmd" prefixed by utf8.
  
  
  process
     repeat scan #main-input
     match utf8.char => character
        output "The Unicode block of '%g(character)' is "
            || unicode.block-name of utf8.code-point of character || "%n"
     again
          

Functions
 
 

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

OmniMark 9.1.0 Documentation Generated: September 2, 2010 at 1:54:44 pm
If you have any comments about this section of the documentation, please use this form.

Copyright © Stilo International plc, 1988-2010.