Prevents translation to a different code page for selected fields in an open table.
SET NOCPTRANS TO [FieldName1 [, FieldName2 ...]] |
Parameters
- TO [ FieldName1[, FieldName2...]]
- Specifies the fields that should not be translated to another code page. Issue SET NOCPTRANS TO without a set of fields to return to the default translation (established by the CODEPAGE configuration item) for all character and memo fields in a table. Use SET("NOCPTRANS") to return the fields specified in the last SET NOCPTRANS command you issued. Use the CHR(В ) function to ensure that individual characters don't get translated.
Remarks
Because Microsoft Visual FoxPro can be configured to automatically translate character and memo fields into other code pages, the SET NOCPTRANS command is available to prevent the automatic translation of fields containing binary data. For example, a memo field may contain a Microsoft Word document. When you access the Word document, you would like the document in its original, untranslated form. Use SET NOCPTRANS to specify that the memo field not be translated.
You don't need to use SET NOCPTRANS to access binary data if the character or memo field containing the binary data has not been translated. You can ensure that character and memo fields are not translated by omitting the CODEPAGE configuration item from your Visual FoxPro configuration file.
For additional information on code pages and Visual FoxPro's international support, see Code Pages Supported by Visual FoxPro in Developing International Applications.