Module Xapi_stdext_encodings.Encodings

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-encoded XML documents.

module XML : 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, * 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