1
1
Fork 0
mirror of https://github.com/pbatard/rufus.git synced 2024-08-14 23:57:05 +00:00

Cope with UTF-8 codepage

Add UTF-8 codepage 65001, sometimes referred to as "Unicode (UTF-8 without signature)". Recent versions of Windows allow for locale variants with UTF-8 encoding, making `CP_UTF8` a valid return for `GetOEMCP()`. Alternatively, you could drop `cp_hr_list` and instead call  [GetCPInfoExA](https://docs.microsoft.com/en-us/windows/win32/api/winnls/nf-winnls-getcpinfoexa).
This commit is contained in:
perennialmind 2020-03-03 16:24:24 -05:00 committed by GitHub
parent 44385829f6
commit e7173da91e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -419,7 +419,8 @@ static cp_list cp_hr_list[] = {
{ 59829, "Georgian"},
{ 60258, "Lat-Azeri"},
{ 60853, "Georgian (Alt)"},
{ 62306, "Cyr-Uzbek"}
{ 62306, "Cyr-Uzbek"},
{ 65001, "Unicode (UTF-8)"}
};
static const char* cp_to_hr(ULONG cp)