## 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.

  Value | Meaning
  --- | ---
  0 | Initial value (non-ASCII character cannot be used)
  437 | U.S.
  720 | Arabic
  737 | Greek
  771 | KBL
  775 | Baltic
  850 | Latin 1
  852 | Latin 2
  855 | Cyrillic
  857 | Turkish
  860 | Portuguese
  861 | Icelandic
  862 | Hebrew
  863 | Canadian French
  864 | Arabic
  865 | Nordic
  866 | Russian
  869 | Greek 2
  932 | Japanese (DBCS)
  936 | Simplified Chinese (DBCS)
  949 | Korean (DBCS)
  950 | Traditional 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