QpDecoderW_decode() takes a Char16Buffer argument, while QpDecoder_decode() takes a Char8Buffer argument. QpDecoderW may be convenient to use with Java, .NET, or COM, where text most often consists of 16-bit Unicode characters.If your program operates in an environment that uses the UTF-8 encoding of Unicode (Linux or Solaris, for example), then you can use the QpDecoder module without any problems, because the quoted-printable-encoded data uses only 7-bit characters.
Please see the documentation for QpDecoder.
Functions | |
| int | QpDecoderW_initialize (QpDecoderW *decoder) |
| Initializes the decoder object. | |
| void | QpDecoderW_finalize (QpDecoderW *decoder) |
| Finalizes the decoder object. | |
| void | QpDecoderW_setOutputCrLf (QpDecoderW *decoder, int b) |
| Sets the CRLF end-of-line characters option. | |
| int | QpDecoderW_getOutputCrLf (QpDecoderW *decoder) |
| Gets the CRLF end-of-line characters option. | |
| void | QpDecoderW_start (QpDecoderW *decoder) |
| Starts a decode operation. | |
| void | QpDecoderW_decode (QpDecoderW *decoder, Char16Buffer *inBuf, ByteBuffer *outBuf) |
| Decodes data from the input buffer to the output buffer. | |
| void | QpDecoderW_finish (QpDecoderW *decoder, ByteBuffer *outBuf) |
| Finishes a decode operation. | |
| int | QpDecoderW_errorStatus (QpDecoderW *decoder) |
| Indicates if a decoding error occurred. | |
|
||||||||||||||||
|
Decodes data from the input buffer to the output buffer. This function takes an input buffer and an output buffer as parameters, and decodes data from the input buffer to the output buffer until either (1) the input buffer is empty, or (2) the output buffer is full. Therefore, one of the following conditions is always true when the function returns:
You may call the function multiple times to decode multiple buffers of input data. However, both of the following conditions should be true before the function is called:
|
|
|
Indicates if a decoding error occurred. The QpDecoderW module correctly decodes all data that is correctly encoded. However, if the data is not correctly encoded, the decoder detects these errors. Because the data is typically text that is presented to a human user, it makes sense for the decoder to be "forgiving" of errors. (Humans are much better at recovering from errors than computers are!) Therefore, decoding errors are not treated as fatal errors. Instead, the decoder tries to recover as best it can and continue. In most cases, if the decoder detects a decoding error, it just passes the encoded data through to the output until it can recover from the error.
You can check for a decoding error by calling
|
|
|
Finalizes the decoder object. You must call this function when you have finished using the decoder. Failure to call this function causes a memory leak.
|
|
||||||||||||
|
Finishes a decode operation. When you perform a decode operation, the decoder buffers some data internally. Therefore, after you have processed all the input data, you must call this function to flush the internal buffer. The following condition must be true when the function is called:
The above condition must also be true when the function returns in order to guarantee that all output data has been written to the output buffer. If the condition is false when the function returns, you must make room in the output buffer and call the function again.
|
|
|
Gets the CRLF end-of-line characters option.
|
|
|
Initializes the decoder object. You must initialize the decoder object before you use it. After you have initialized it, you may use the decoder object for multiple decode operations.
When you have finished using the decoder object, call
|
|
||||||||||||
|
Sets the CRLF end-of-line characters option. If this option is true, then the decoder outputs CR LF as the end-of-line character sequence for hard line breaks. If the option is set to false, then the decoder outputs LF alone. The default value is false.
|
|
|
Starts a decode operation.
After you call
|
Copyright © 2001-2006 Hunny Software, Inc. All rights reserved.