CPCONVERT( ) Function

See Also

Converts character or memo fields or character expressions to another code page.

Syntax

CPCONVERT(nCurrentCodePage, nNewCodePage, cExpression)

Arguments

nCurrentCodePage

Specifies the code page that cExpression is being converted from.

nNewCodePage

Specifies the code page to which cExpression is converted.

cExpression

Specifies the character expression that's converted.

Remarks

Note that CPCONVERT( ) isn't required for normal cross-platform functioning of the product. It is used strictly to access the underlying translation facilities of Visual FoxPro.

For example, if the variable gcCharExpr contains a character that looks like ä on the Macintosh (in code page 10000) then CPCONVERT( ) will return a character that looks like ä in Microsoft Windows (code page 1252):

CPCONVERT(10000, 1252, gcCharExpr)

For additional information on code pages and Visual FoxPro's international support, see Code Pages Supported by Visual FoxPro in Chapter 18, Developing International Applications, in the Programmer's Guide.