Difference between revisions of "DecodeQuotedPrintable"

From Xojo Documentation

m
Line 7: Line 7:
 
|text = Decodes into “normal” text a string that has been encoded by [[EncodeQuotedPrintable]]. }}
 
|text = Decodes into “normal” text a string that has been encoded by [[EncodeQuotedPrintable]]. }}
  
==Syntax==
+
== Usage ==
''result''='''DecodeQuotedPrintable'''(''str'' [, ''encoding''])  
+
''result'' = '''DecodeQuotedPrintable'''(''str'' [, ''encoding''])  
 
{| class="genericTable"
 
{| class="genericTable"
 
 
! width=15% | Part
 
! width=15% | Part
 
 
! width=15% | Type
 
! width=15% | Type
 
 
! width=55% | Description
 
! width=55% | Description
 
|-
 
|-
 
|result
 
|result
 
 
|[[String]]
 
|[[String]]
 
|The result of processing ''str''.
 
|The result of processing ''str''.
 
 
|-
 
|-
 
|str
 
|str
 
 
|[[String]]
 
|[[String]]
 
|The string expression to be decoded back to its original form.
 
|The string expression to be decoded back to its original form.
 
 
|-
 
|-
 
|encoding
 
|encoding
 
 
|[[TextEncoding]]
 
|[[TextEncoding]]
 
|Optional: The text encoding of the passed string.  
 
|Optional: The text encoding of the passed string.  
 
If you pass an encoding, is has the same effect as calling [[DefineEncoding]] on the returned [[String]].
 
If you pass an encoding, is has the same effect as calling [[DefineEncoding]] on the returned [[String]].
 
 
|-
 
|-
 
|}
 
|}
Line 45: Line 36:
 
[[DecodeQuotedPrintable]] can decode strings in which hexadecimal values are represented in lowercase as well as the standard uppercase.
 
[[DecodeQuotedPrintable]] can decode strings in which hexadecimal values are represented in lowercase as well as the standard uppercase.
  
==Example==
+
== Sample Code ==
 
+
The following code takes the contents of TextArea1 and decodes it. If TextArea1 contains Return character, [[EncodeQuotedPrintable]] encodes them and '''DecodeQuotedPrintable''' decodes them.
The following example takes the contents of TextArea1 and decodes it. If TextArea1 contains Return character, [[EncodeQuotedPrintable]] encodes them and '''DecodeQuotedPrintable''' decodes them.
 
 
 
 
<rbcode>
 
<rbcode>
 
Dim s As String
 
Dim s As String
Line 57: Line 46:
  
 
==See Also==
 
==See Also==
[[EncodeQuotedPrintable]] function.
+
[[EncodeQuotedPrintable]] function
 
 
  
 
[[Category:Internet/Networking_Internet]]
 
[[Category:Internet/Networking_Internet]]

Revision as of 20:13, 12 February 2019

Method

Decodes into “normal” text a string that has been encoded by EncodeQuotedPrintable.

Usage

result = DecodeQuotedPrintable(str [, encoding])

Part Type Description
result String The result of processing str.
str String The string expression to be decoded back to its original form.
encoding TextEncoding Optional: The text encoding of the passed string.

If you pass an encoding, is has the same effect as calling DefineEncoding on the returned String.

Notes

DecodeQuotedPrintable converts text representations of unprintable characters (i.e., control characters, returns and tabs) back into their original form. It is designed for handling email or usenet messages. It undoes the encoding done by EncodeQuotedPrintable.

The DecodeQuotedPrintable function performs the function in reverse.

DecodeQuotedPrintable can decode strings in which hexadecimal values are represented in lowercase as well as the standard uppercase.

Sample Code

The following code takes the contents of TextArea1 and decodes it. If TextArea1 contains Return character, EncodeQuotedPrintable encodes them and DecodeQuotedPrintable decodes them.

Dim s As String
s = EncodeQuotedPrintable(TextArea1.Text)

TextArea2.Text = DecodeQuotedPrintable(s)

See Also

EncodeQuotedPrintable function