Adds or removes a code page from the National Language Support (NLS) list.
|
|---|
SYS(2300, nCodePage [, nAction]) |
Parameters
-
nCodePage
-
Specifies the integer code page value.
-
nAction
-
Specifies the action to perform on the specified code page. 0 removes the code page; 1 adds the code page.
Return Value
Character. SYS(2300) returns 1 if nCodePage appears in the NLS list; otherwise, it returns 0.
Remarks
Example
Code page 1250 is not included in the NLS list by default. Therefore, certain string comparisons might return unexpected values. To demonstrate this, follow these steps:
-
Enable code page support for non-NLS code page 1250 by adding the following line to your config.fpw file:
| | Copy Code |
|---|
CODEPAGE = 1250 |
-
Restart Visual FoxPro.
-
Run the following code from a program file:
| | Copy Code |
|---|
SET COLLATE TO 'HUNGARY' && Requires CODEPAGE = 1250 in config file
CLEAR
? UPPER("B")=LOWER("B"), LOWER("B")=UPPER("B")
? UPPER("F")=LOWER("F"), LOWER("F")=UPPER("F")
? UPPER("H")=LOWER("H"), LOWER("H")=UPPER("H")
=SYS(2300,1250,1) && Add code page 1250 to NLS list
? UPPER("B")=LOWER("B"), LOWER("B")=UPPER("B")
? UPPER("F")=LOWER("F"), LOWER("F")=UPPER("F")
? UPPER("H")=LOWER("H"), LOWER("H")=UPPER("H")
=SYS(2300,1250,0) && Restore default setting for code page 1250
RETURN |
With the default settings, LOWER("B")=UPPER("B"), LOWER("F")=UPPER("F"), and LOWER("H")=UPPER("H") return .T..
After enabling NLS support for code page 1250, LOWER("B")=UPPER("B"), LOWER("F")=UPPER("F"), and LOWER("H")=UPPER("H") return .F..
See Also