maxon::StringEncodings Namespace Reference

Detailed Description

SystemCodePage

  • SystemCodePage encodes characters from Utf32Char to the active system code page (UChar).
  • SystemCodePage decodes characters from the active systemcodepage (UChar) to Utf32Char

Details:

Errors:
Returns an error if the system functions return errors.


Bit8

  • encodes characters from Utf32Char to UChar
  • decodes characters from UChar to Utf32Char

Details:

  • characters in the range 0..255 are encoded as single byte values

Errors:
Returns an error if character codes outside the valid range are used.


Bit7Hex

  • encodes characters from UniChar to UChar
  • decodes characters from UChar to UniChar

Details:

  • characters in the range 0..127 are encoded as single byte values
  • characters above 127 are encoded into a sequence of bytes with the format \uhhhh where each hhhh is the hex value representing the character in Unicode space.

Errors:
Returns an error if character codes outside the valid range are used.


UTF-8

  • encodes characters from Utf32Char to UChar
  • decodes characters from UChar to Utf32Char

Details:
UTF-8 (UCS Transformation Format-8-bit) is a variable-width encoding that can represent every character in the Unicode character set. Depending on the number range a UniCode character is encoded in either a single byte or multiple bytes where the byte sequence starts with a leading byte followed by one or more continuation bytes. Currently the 32bit UniCode range below 0x10000 is supported (resulting in up to 4 byte sequences)

Errors:
Returns an error if byte code sequences (unicode >=0x10000) with more then 4 bytes are used for decoding.

Note
UTF-8 was designed for backward compatibility with ASCII and to avoid the complications of endianness and byte order marks in UTF-16 and UTF-32. UTF-8 has become the dominant character encoding for the World Wide Web, accounting for more than half of all Web pages. The Internet Mail Consortium (IMC) recommends that all e-mail programs be able to display and create mail using UTF-8. UTF-8 is also increasingly being used as the default character encoding in operating systems, programming languages, APIs, and software applications. More details can be found here: http://en.wikipedia.org/wiki/UTF-8

UTF-16

  • encodes characters from Utf32Char to UTF-16
  • decodes characters from UTF-16 to Utf32Char

Details:
UTF-16 is a variable-width encoding that can represent every character in the Unicode character set. Depending on the number range a UniCode character is encoded in either a single or two 16-bit values.

Errors:
Returns an error if an illegal code sequence is detected during decoding.

More details can be found here: http://en.wikipedia.org/wiki/UTF-16

Url

  • Url encodes characters from Utf32Char to UChar
  • Url decodes characters from UChar to Utf32Char

Details:

  • only characters in the range 0..255 are accepted
  • all characters which are not Unreserved Characters are encoded using percent encoding- for example the space character " " is encoded as "%20" More details can be found here: http://www.ietf.org/rfc/rfc3986.txt

Errors:
Returns an error if character codes outside the valid range are used.

Url

  • Url encodes characters from Utf32Char to UChar
  • Url decodes characters from UChar to Utf32Char Details:
  • only characters in the range 0..255 are accepted
  • all characters which are not Unreserved Characters are encoded using percent encoding- for example the space character " " is encoded as "%20" More details can be found here: http://www.ietf.org/rfc/rfc3986.txt
  • additionally the backslash '\' is a reserved character and hence ignored for encoding

Errors:
Returns an error if character codes outside the valid range are used.

Url

  • Url encodes characters from Utf32Char to UChar
  • Url decodes characters from UChar to Utf32Char

Details:

  • only characters in the range 0..255 are accepted
  • all characters which are not Unreserved Characters are encoded using percent encoding- for example the space character " " is encoded as "%20" More details can be found here: http://www.ietf.org/rfc/rfc3986.txt
  • additionally the characters '&', '=', '$', '+', ',', ':', ';' and '@' are reserved characters and hence ignored for encoding

Errors:
Returns an error if character codes outside the valid range are used.

Url

  • Url encodes characters from Utf32Char to UChar
  • Url decodes characters from UChar to Utf32Char

Details:

  • only characters in the range 0..255 are accepted
  • all characters which are not Unreserved Characters are encoded using percent encoding- for example the space character " " is encoded as "%20" More details can be found here: http://www.ietf.org/rfc/rfc3986.txt
  • all characters will be encoded.

Errors:
Returns an error if character codes outside the valid range are used.


CodePage437

  • encodes characters from Utf32Char to UChar
  • decodes characters from UChar to Utf32Char

Details:

Errors:
Returns an error if character codes outside the valid range are used.

Functions

 MAXON_DECLARATION (maxon::StringEncodingRef, SystemCodePage, "net.maxon.stringencoding." "systemcodepage")
 
 MAXON_DECLARATION (maxon::StringEncodingRef, Bit8, "net.maxon.stringencoding." "bit8")
 
 MAXON_DECLARATION (maxon::StringEncodingRef, Bit7Hex, "net.maxon.stringencoding." "hex7")
 
 MAXON_DECLARATION (maxon::StringEncodingRef, Utf8, "net.maxon.stringencoding." "utf8")
 
 MAXON_DECLARATION (maxon::StringEncodingRef, Utf16, "net.maxon.stringencoding." "utf16")
 
 MAXON_DECLARATION (maxon::StringEncodingRef, Url, "net.maxon.stringencoding." "url")
 
 MAXON_DECLARATION (maxon::StringEncodingRef, Url32, "net.maxon.stringencoding." "url32")
 
 MAXON_DECLARATION (maxon::StringEncodingRef, UrlPath, "net.maxon.stringencoding." "urlpath")
 
 MAXON_DECLARATION (maxon::StringEncodingRef, UrlQuery, "net.maxon.stringencoding." "urlquery")
 
 MAXON_DECLARATION (maxon::StringEncodingRef, UrlQueryParameter, "net.maxon.stringencoding." "urlqueryparam")
 
 MAXON_DECLARATION (maxon::StringEncodingRef, CodePage437, "net.maxon.stringencoding." "codepage437")
 

Function Documentation

◆ MAXON_DECLARATION() [1/11]

maxon::StringEncodings::MAXON_DECLARATION ( maxon::StringEncodingRef  ,
SystemCodePage  ,
"net.maxon.stringencoding." "systemcodepage"   
)

◆ MAXON_DECLARATION() [2/11]

maxon::StringEncodings::MAXON_DECLARATION ( maxon::StringEncodingRef  ,
Bit8  ,
"net.maxon.stringencoding." "bit8"   
)

◆ MAXON_DECLARATION() [3/11]

maxon::StringEncodings::MAXON_DECLARATION ( maxon::StringEncodingRef  ,
Bit7Hex  ,
"net.maxon.stringencoding." "hex7"   
)

◆ MAXON_DECLARATION() [4/11]

maxon::StringEncodings::MAXON_DECLARATION ( maxon::StringEncodingRef  ,
Utf8  ,
"net.maxon.stringencoding." "utf8"   
)

◆ MAXON_DECLARATION() [5/11]

maxon::StringEncodings::MAXON_DECLARATION ( maxon::StringEncodingRef  ,
Utf16  ,
"net.maxon.stringencoding." "utf16"   
)

◆ MAXON_DECLARATION() [6/11]

maxon::StringEncodings::MAXON_DECLARATION ( maxon::StringEncodingRef  ,
Url  ,
"net.maxon.stringencoding." "url"   
)

◆ MAXON_DECLARATION() [7/11]

maxon::StringEncodings::MAXON_DECLARATION ( maxon::StringEncodingRef  ,
Url32  ,
"net.maxon.stringencoding." "url32"   
)

◆ MAXON_DECLARATION() [8/11]

maxon::StringEncodings::MAXON_DECLARATION ( maxon::StringEncodingRef  ,
UrlPath  ,
"net.maxon.stringencoding." "urlpath"   
)

◆ MAXON_DECLARATION() [9/11]

maxon::StringEncodings::MAXON_DECLARATION ( maxon::StringEncodingRef  ,
UrlQuery  ,
"net.maxon.stringencoding." "urlquery"   
)

◆ MAXON_DECLARATION() [10/11]

maxon::StringEncodings::MAXON_DECLARATION ( maxon::StringEncodingRef  ,
UrlQueryParameter  ,
"net.maxon.stringencoding." "urlqueryparam"   
)

◆ MAXON_DECLARATION() [11/11]

maxon::StringEncodings::MAXON_DECLARATION ( maxon::StringEncodingRef  ,
CodePage437  ,
"net.maxon.stringencoding." "codepage437"   
)