package xapi-stdext-encodings

  1. Overview
  2. Docs

Encoding helper modules

Exceptions

exception UCS_value_out_of_range
exception UCS_value_prohibited_in_UTF8
exception UCS_value_prohibited_in_XML
exception UTF8_character_incomplete
exception UTF8_header_byte_invalid
exception UTF8_continuation_byte_invalid
exception UTF8_encoding_not_canonical
exception String_incomplete

UCS Validators

module type UCS_VALIDATOR = sig ... end

Validates UCS character values.

Accepts all values within the UCS character value range * except those which are invalid for all UTF-8 documents.

Accepts all values within the UCS character value range except * those which are invalid for all UTF-8-encoded XML documents.

module UCS : sig ... end
val (+++) : int32 -> int32 -> int32
val (---) : int32 -> int32 -> int32
val (&&&) : int32 -> int32 -> int32
val (|||) : int32 -> int32 -> int32
val (<<<) : int32 -> int -> int32
val (>>>) : int32 -> int -> int32
module XML : sig ... end

Character Codecs

module type CHARACTER_ENCODER = sig ... end
module type CHARACTER_DECODER = sig ... end
module UTF8_CODEC (UCS_validator : UCS_VALIDATOR) : sig ... end
module UTF8_codec : sig ... end
module XML_UTF8_codec : sig ... end

String Validators

module type STRING_VALIDATOR = sig ... end

Provides functionality for validating and processing * strings according to a particular character encoding.

exception Validation_error of int * exn

Represents a validation error as a tuple (i,e), where: * i = the index of the first non-compliant character; * e = the reason for non-compliance.

Provides functions for validating and processing * strings according to the UTF-8 character encoding. * * Validly-encoded strings must satisfy RFC 3629. * * For further information, see: * http://www.rfc.net/rfc3629.html

Provides functions for validating and processing * strings according to the UTF-8 character encoding, * with certain additional restrictions on UCS values * imposed by the XML specification. * * Validly-encoded strings must satisfy both RFC 3629 * and section 2.2 of the XML specification. * * For further information, see: * http://www.rfc.net/rfc3629.html * http://www.w3.org/TR/REC-xml/#charsets

OCaml

Innovation. Community. Security.