IP*Works! V9 - Online Help
IP*Works! V9
Questions / Feedback?

Format Property

The type of encoding to be used.

Syntax

 netcode.getFormat([callback])
 netcode.setFormat( format, [callback])

Possible Values

  0 (fmtUUEncode), 
  1 (fmtBase64), 
  2 (fmtQP), 
  3 (fmtURL), 
  4 (fmtJIS), 
  5 (fmtYEncode), 
  6 (fmtMD5Hash), 
  7 (fmtSHA1Hash), 
  8 (fmtHex), 
  9 (fmtHTML), 
  10 (fmtHMAC), 
  11 (fmtUTF8), 
  12 (fmtUTF7), 
  13 (fmtBase32), 
  14 (fmtBase64URL)

Default Value

0


Callback

The 'callback' parameter specifies a function which will be called when the operation completes (or an error is encountered). If the 'callback' parameter is not specified, then the method will block and will not return until the operation completes (or an error is encountered).

The callback for the getFormat([callback]) method is defined as:

function(err, data){ }

'err' is the error that occurred. If there was no error, then 'err' is 'null'.

'data' is the value returned by the method.

The callback for the setFormat([callback]) method is defined as:

function(err){ }

'err' is the error that occurred. If there was no error, then 'err' is 'null'.

'err' has 2 properties which hold detailed information:

err.code
err.message

Remarks

This property contains the type of encoding to be used. The following are the possible values for this property, and the corresponding descriptions:

fmtUUEncode (0)The most popular standard. 3 Bytes are encoded into 4 readable characters. If multiple filenames are specified, then the extension ".uue" is used/expected.
fmtBase64 (1)Encoding format of MIME. Much like UUEncode but another subset of printable characters is used. If multiple filenames are specified, then the extension ".b64" is used/expected.
fmtQP (2)Quoted-Printable is another MIME format coding only special characters. Mostly used if the text contains special accented characters. If multiple filenames are specified, then the extension ".q_p" is used/expected.
fmtURL (3)Encoding of non-printable, 8-bit or unsafe characters as defined in RFC 1738. (No multiple filenames can be specified with this encoding.)
fmtJIS (4)Japanese Industrial Standards encoding of Japanese character sets.
fmtYEncode (5)Similar to Base64, but uses 8-bit encoding to reduce the amount of data being sent and received. Designed for binaries on the Usenet or Email.
fmtMD5Hash (6)The Message Digest 5 hashing algorithm produces a 128-bit hash output.
fmtSHA1Hash (7)The Secure Hash Algorithm produces a 128-bit hash output.
fmtHex (8)Creates a hexadecimal string representation of the decoded data.
fmtHTML (9)Creates an HTML-encoded string.
fmtHMAC (10)Creates a Hash-based Message Authentication Code for the given data. To set the key, use HMACKey. To set the hash algorithm to use to create the MAC, use HMACAlgorithm.
fmtUTF8 (11)Convert strings to/from UTF-8 to the current code page (Windows only).
fmtUTF7 (12)Convert strings to/from UTF-7 to the current code page (Windows only).
fmtBase32 (13)Similar to Base64, but uses 32 printable characters. If multiple filenames are specified, then the extension ".b32" is used/expected.
fmtBase64URL (14)Base64 encoding for use within URLs. The "+" character is replaced with "-". The "/" character is replaced with "_". The padding character "=" is omitted.

Data Type

Integer

 
 
Copyright (c) 2018 /n software inc. - All rights reserved.
Build 9.0.6635.0