peTranslateReceived - cXmlHttpTransfer
Determines character translation for received data
Type: Property
Access: Read/Write
Data Type: Integer
Parameters: None
Syntax
Property Integer peTranslateReceived
| Access Type | Syntax |
|---|---|
| Read Access: | Get peTranslateReceived to IntegerVariable |
| Write Access: | Set peTranslateReceived to IntegerVariable/Value |
Description
The peTranslateReceived property determines character translation for received data.
The modes supported are:
| Constant | Meaning |
|---|---|
| xtNoTranslate | No translation. Data is unchanged |
| xtUtf8toOem | Convert from UTF-8 to Oem - most likely used when loading XML documents. |
| xtOemtoUtf8 | Convert from Oem to UTF-8 - most likely used when sending XML documents |
The most likely translation modes for receiving data are OEM to UTF8 and None. The default is xtUtf8toOem.
The messages HttpPostXmlNode, HttpPostXmlString, HttpPostXmlAddr, HttpGetXmlNode, HttpGetXmlString and HttpGetXmlAddr use this property to determine how received data should be translated.
The function TranslateData is used to perform data translation. If additional translation modes are needed, this function can be augmented to support those modes.
Sample
Get Create U_cXmlHttpTransfer to hoHttp
Set peTranslateReceived of hoHttp to xtNoTranslate // no translate data
Get HttpGetXmlNode of hoHttp "dataaccess.com" ;
"MyApplication/XmlService.asp" hoSentXml to hoRcvdXml
Send Destroy of hoHttp
If hoRcvdXml Begin
// do whatever you need to do with the new XML document
:
Send Destroy of hoRcvdXml //programmer must destroy object when done
End