swirl Guide to OmniMark 5   OmniMark home
docs home 
IndexConceptsTasksSyntaxLibrariesOMX VariablesErrors
 
    Related Concepts   Other Library Functions  
function   utf8-char-number    

Library: utf8pat - UTF-8 text processing
Include: utf8pat.xin
Return type: Integer
Returns:       

Integer value corresponding to the specified UTF-8 character.


Declaration

  define integer function utf8-char-number
      value stream utf8-string


Purpose

You can use utf8-char-number to convert a string containing a single UTF-8 character to the character number it encodes.

If the string does not consist of a single UTF-8 encoded character, the character number of the Unicode Replacement Character (U-FFFD) is returned instead.

The following program converts a UTF-8 encoded file to a long character encoding (2 bytes for every character):

  include utf8pat.xin

  process
      submit file #main-input

  find utf8-char => char
      output "2f0b" % utf8-char-number char

      Related Concepts
   Character set encoding
 
Other Library Functions
   utf8-char
   utf8-char-number
   utf8-encoded
 
----  

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

Generated: August 11, 2000 at 3:08:10 pm
If you have any comments about this section of the documentation, send email to docerrors@omnimark.com

Copyright © OmniMark Technologies Corporation, 1988-2000.