f_setcp

The f_setcp function sets the active code page.

FRESULT f_setcp (
  WORD cp     /* [IN] Code page to be set */
);

Parameters

cp
OEM code page to be used for the path name. Valid values are as follows.
ValueMeaning
0Initial value (non-ASCII character cannot be used)
437U.S.
720Arabic
737Greek
771KBL
775Baltic
850Latin 1
852Latin 2
855Cyrillic
857Turkish
860Portuguese
861Icelandic
862Hebrew
863Canadian French
864Arabic
865Nordic
866Russian
869Greek 2
932Japanese (DBCS)
936Simplified Chinese (DBCS)
949Korean (DBCS)
950Traditional Chinese (DBCS)

Return Values

FR_OK, FR_INVALID_PARAMETER

Description

The f_setcp function sets the active code page for the path name. Also code conversion of string functions will be affected by the code page when FF_LFN_UNICODE = 1 and FF_STRF_ENCODE = 0. Because the initial setting of the code page is 0 and API function with non-ASCII character will not work properly. Any valid code page needs to be set on the system start-up and it should not be changed on the fly.

QuickInfo

Available when FF_CODE_PAGE == 0.

Return