swirl
Guide to OmniMark 7   OmniMark home
docs home 
IndexConceptsTasksSyntaxLibrariesLegacy LibrariesErrors
 
    Related Concepts   Other Library Functions  
function  

utf8.encoding

 
 

Library: Character encodings, UTF-8 (OMUTF8 )
Import: omutf8.xmd
Return type: String
Returns: 

A string representing the UTF-8 encoding of the specified Unicode character code.


Declaration

  define stream function utf8.encoding
  	of value integer n


Purpose

You can use utf8.encoding to convert an integer containing a Unicode character code to a string of bytes containing the UTF-8 encoding of that character code.

The following program converts a long character encoding (2 bytes per character) to a UTF-8 encoding:

  import "omutf8.xmd" prefixed by utf8.

  process
      submit file #main-input

  find any{2} => char
      output utf8.encoding of binary char

      Related Concepts
   Character set encoding
 
Other Library Functions
   utf8.char
   utf8.code-point
   utf8.encoding
   utf8.multi-byte-char
   utf8.omutf8-version
   utf8.single-byte-char
 
 

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

OmniMark 7.1.2 Documentation Generated: June 28, 2005 at 5:45:57 pm
If you have any comments about this section of the documentation, send email to [email protected]

Copyright © Stilo Corporation, 1988-2005.