Seed7 - The extensible programming language
Seed7 FAQ Manual Screenshots Examples Libraries Algorithms Download Links
Libraries AES ARC4 Array ASN.1 Bigfile Bigint Bigrat Bin32 Bin64 Bitdata Bitmapfont Bitset Bitsetof Boolean Browser Bstring Bytedata Cards Category CC config Cgi Cgi dialog Char Charsets Cipher Clib_file Color CLI Commands Complex Console Crc32 Deflate DES Dialog Dir Draw Duration Echo Editline Enable_input Enable_io Enable_output Encoding Environment External_file File File system Float Font Forloop Ftp Getf Gethttp Gethttps Graph Graph_file Gzip Hash Hashsetof Hmac Html_ent Httpserv Idxarray Image Inflate Inflate file Inifile Integer Keybd Line Listener LZW Make Math Msgdigest Null_file Osfiles Picture utility Pixmap_file Pixmapfont PKCS #1 Poll Process Progs Propertyfile Rational Reference Ref_list Scanfile Scanstri Set Shell Smtp Sockbase Socket SQL base Stdio Strifile String Stritext Subrange Tar Text Time TLS/SSL Triple DES Unicode Utf16 Utf8 Vectorfont 3D Vector Wildcard Window Wrinum X.509 Xmldom Xml_ent Zip
Libraries
Encoding Source Code
 previous   up   next 

Function Summary
string
toBase64 (in string: byteStri)
Encode a string with the Base64 encoding.
string
fromBase64 (in string: base64)
Decode a Base64 encoded string.
string
toQuotedPrintable (in string: byteStri)
Encode a string with the Quoted-printable encoding.
string
fromQuotedPrintable (in string: quoted)
Decode a quoted-printable encoded string.
string
toUuencoded (in string: byteStri)
Encode a string with uuencoding.
string
fromUuencoded (in string: uuencoded)
Decode an uuencoded string.
string
toPercentEncoded (in string: byteStri)
Encode a string with percent-encoding.
string
fromPercentEncoded (in string: percentEncoded)
Decode a percent-encoded string.
string
toUrlEncoded (in string: byteStri)
Encode a string with URL encoding.
string
fromUrlEncoded (in string: urlEncoded)
Decode an URL encoded string.
string
toAscii85 (in string: byteStri)
Encode a string with the Ascii85 encoding.
string
fromAscii85 (in string: ascii85)
Decode a Ascii85 encoded string.

Function Detail

toBase64

const func string: toBase64 (in string: byteStri)

Encode a string with the Base64 encoding. Base64 encodes a byte string as ASCII string. This is done by taking packs of 6-bits and translating them into a radix-64 representation. The radix-64 digits are encoded with letters (upper case followed by lower case), digits and the characters '+' and '/'.

Returns:
the Base64 encoded string.
Raises:
RANGE_ERROR - When characters beyond '\255;' are present.

fromBase64

const func string: fromBase64 (in string: base64)

Decode a Base64 encoded string.

Parameters:
base64 - Base64 encoded string without leading or trailing whitespace characters.
Returns:
the decoded string.
Raises:
RANGE_ERROR - When base64 is not in Base64 format.

toQuotedPrintable

const func string: toQuotedPrintable (in string: byteStri)

Encode a string with the Quoted-printable encoding. Quoted-printable encodes a byte string as ASCII string. This is done by encoding printable ASCII characters except '=' as themself. Other byte values are encoded with '=' followed by two hexadecimal digits representing the byte's numeric value.

Returns:
the encoded string.
Raises:
RANGE_ERROR - When characters beyond '\255;' are present.

fromQuotedPrintable

const func string: fromQuotedPrintable (in string: quoted)

Decode a quoted-printable encoded string.

Returns:
the decoded string.
Raises:
RANGE_ERROR - When quoted is not in quoted-printable format.

toUuencoded

const func string: toUuencoded (in string: byteStri)

Encode a string with uuencoding. Uuencode encodes a byte string as ASCII string. This is done by taking packs of 6-bits and translating them into a radix-64 representation. The radix-64 digits are encoded with consecutive ASCII characters starting from ' ' (which represents 0). Every line starts with a radix-64 digit character indicating the number of data bytes encoded on that line.

Returns:
the encoded string.
Raises:
RANGE_ERROR - When characters beyond '\255;' are present.

fromUuencoded

const func string: fromUuencoded (in string: uuencoded)

Decode an uuencoded string.

Returns:
the decoded string.
Raises:
RANGE_ERROR - When uuencoded is not in uuencoded format.

toPercentEncoded

const func string: toPercentEncoded (in string: byteStri)

Encode a string with percent-encoding. Percent-encoding encodes a byte string as ASCII string. This is done by encoding all characters, which are not in the set of unreserved characters (A-Z, a-z, 0-9 - _ . ~). The encoding uses a percent sign ('%') followed by two hexadecimal digits, which represent the ordinal value of the encoded character.

Returns:
the encoded string.
Raises:
RANGE_ERROR - When characters beyond '\255;' are present.

fromPercentEncoded

const func string: fromPercentEncoded (in string: percentEncoded)

Decode a percent-encoded string. Percent-encoding encodes a byte string as ASCII string. It uses the percent sign ('%') followed by two hexadecimal digits to encode characters that otherwise would not be allowed in an URL. Allowed URL characters are encoded as themself.

Returns:
the decoded string.

toUrlEncoded

const func string: toUrlEncoded (in string: byteStri)

Encode a string with URL encoding. URL encoding encodes a byte string as ASCII string. This is done by encoding all characters, which are not in the set of unreserved characters (A-Z, a-z, 0-9 - _ . ~). The encoding uses a percent sign ('%') followed by two hexadecimal digits, which represent the ordinal value of the encoded character. A plus sign ('+') is used to encode a space (' ').

Returns:
the encoded string.
Raises:
RANGE_ERROR - When characters beyond '\255;' are present.

fromUrlEncoded

const func string: fromUrlEncoded (in string: urlEncoded)

Decode an URL encoded string. URL encoding encodes a byte string as ASCII string. It uses the percent sign ('%') followed by two hexadecimal digits to encode characters that otherwise would not be allowed in an URL. A plus sign ('+') is used to encode a space (' '). Allowed URL characters are encoded as themself.

Returns:
the decoded string.

toAscii85

const func string: toAscii85 (in string: byteStri)

Encode a string with the Ascii85 encoding. Ascii85 encodes a byte string as ASCII string. This is done by encoded every four bytes with five printable ASCII characters. Five radix 85 digits provide enough possible values to encode the possible values of four bytes. The radix 85 digits are encoded with the characters '!' (encodes 0) through 'u' (encodes 84). If the last block of the byte string contains fewer than 4 bytes, the block is padded with up to three null bytes before encoding. After encoding, as many bytes as were added as padding are removed from the end of the output. In files the end of an Ascii85 encoding is marked with "~>" (this end marker is not added by toAscii85).

Returns:
the Ascii85 encoded string.
Raises:
RANGE_ERROR - When characters beyond '\255;' are present.

fromAscii85

const func string: fromAscii85 (in string: ascii85)

Decode a Ascii85 encoded string. Every block of five radix 85 characters is decoded to four bytes. Radix 85 charaters are between '!' (encodes 0) and 'u' (encodes 84). The character 'z' is used to encode a block of four zero bytes. White space in the Ascii85 encoded string is ignored. The last block is padded to 5 bytes with the Ascii85 character "u", and as many bytes as were added as padding are omitted from the end of the output.

Returns:
the decoded string.
Raises:
RANGE_ERROR - When ascii85 is not in Ascii85 format.


 previous   up   next