Partager via


Specification of Code Pages for Variables

You might want to manipulate international data in certain ways. For example, you might want to translate the data in a variable to another code page, or you might want to prevent translation of data in a character or memo field.

Translating Data in Variables

If the code in your application includes a variable containing data from another code page, you can translate the data to the proper code page using the CPCONVERT( ) function. For example, suppose the variable x contains data created with the Macintosh code page (10000). To translate the data to the Windows code page (1252), issue the following command:

cConvert=CPCONVERT(10000,1252,x)

In Windows, the converted data looks just as you see it on the Macintosh. For example, a character that looks like "" on the Macintosh looks identical in Windows.

See Also

Determining the Code Page of a Project File | Preventing Translation of Data in Character or Memo Fields | Developing International Applications | Code Pages Supported by Visual FoxPro | Code Pages in Visual FoxPro