notepad: Load UTF-8 encoding name from resources instead of using GetCPInfoEx.

This commit is contained in:
Alexander Scott-Johns 2011-01-27 20:08:22 +00:00 committed by Alexandre Julliard
parent e81e49787c
commit 321e4c0eec
48 changed files with 262 additions and 48 deletions

View File

@ -8337,7 +8337,12 @@ msgstr "يونيكود (UTF-16)"
msgid "Unicode (UTF-16 big-endian)"
msgstr "يونيكود (UTF-16 Big Endian)"
#: notepad.rc:101
#: notepad.rc:95
#, fuzzy
msgid "Unicode (UTF-8)"
msgstr "يونيكود (UTF-16)"
#: notepad.rc:102
msgid ""
"%s\n"
"This file contains Unicode characters which will be lost if\n"

View File

@ -8515,7 +8515,11 @@ msgstr ""
msgid "Unicode (UTF-16 big-endian)"
msgstr ""
#: notepad.rc:101
#: notepad.rc:95
msgid "Unicode (UTF-8)"
msgstr ""
#: notepad.rc:102
msgid ""
"%s\n"
"This file contains Unicode characters which will be lost if\n"

View File

@ -8253,7 +8253,11 @@ msgstr ""
msgid "Unicode (UTF-16 big-endian)"
msgstr ""
#: notepad.rc:101
#: notepad.rc:95
msgid "Unicode (UTF-8)"
msgstr ""
#: notepad.rc:102
msgid ""
"%s\n"
"This file contains Unicode characters which will be lost if\n"

View File

@ -8883,7 +8883,11 @@ msgstr ""
msgid "Unicode (UTF-16 big-endian)"
msgstr ""
#: notepad.rc:101
#: notepad.rc:95
msgid "Unicode (UTF-8)"
msgstr ""
#: notepad.rc:102
msgid ""
"%s\n"
"This file contains Unicode characters which will be lost if\n"

View File

@ -8939,7 +8939,12 @@ msgstr "Unicode (UTF-16)"
msgid "Unicode (UTF-16 big-endian)"
msgstr "Unicode (UTF-16 big-endian)"
#: notepad.rc:101
#: notepad.rc:95
#, fuzzy
msgid "Unicode (UTF-8)"
msgstr "Unicode (UTF-16)"
#: notepad.rc:102
msgid ""
"%s\n"
"This file contains Unicode characters which will be lost if\n"

View File

@ -8901,7 +8901,12 @@ msgstr "Unicode (UTF-16)"
msgid "Unicode (UTF-16 big-endian)"
msgstr "Unicode (UTF-16 Big-Endian)"
#: notepad.rc:101
#: notepad.rc:95
#, fuzzy
msgid "Unicode (UTF-8)"
msgstr "Unicode (UTF-16)"
#: notepad.rc:102
msgid ""
"%s\n"
"This file contains Unicode characters which will be lost if\n"

View File

@ -8369,7 +8369,11 @@ msgstr ""
msgid "Unicode (UTF-16 big-endian)"
msgstr ""
#: notepad.rc:101
#: notepad.rc:95
msgid "Unicode (UTF-8)"
msgstr ""
#: notepad.rc:102
msgid ""
"%s\n"
"This file contains Unicode characters which will be lost if\n"

View File

@ -8569,7 +8569,11 @@ msgstr ""
msgid "Unicode (UTF-16 big-endian)"
msgstr ""
#: notepad.rc:101
#: notepad.rc:95
msgid "Unicode (UTF-8)"
msgstr ""
#: notepad.rc:102
msgid ""
"%s\n"
"This file contains Unicode characters which will be lost if\n"

View File

@ -8671,7 +8671,11 @@ msgstr "Unicode (UTF-16)"
msgid "Unicode (UTF-16 big-endian)"
msgstr "Unicode (UTF-16 big-endian)"
#: notepad.rc:101
#: notepad.rc:95
msgid "Unicode (UTF-8)"
msgstr "Unicode (UTF-8)"
#: notepad.rc:102
msgid ""
"%s\n"
"This file contains Unicode characters which will be lost if\n"

View File

@ -8511,7 +8511,11 @@ msgstr ""
msgid "Unicode (UTF-16 big-endian)"
msgstr ""
#: notepad.rc:101
#: notepad.rc:95
msgid "Unicode (UTF-8)"
msgstr ""
#: notepad.rc:102
msgid ""
"%s\n"
"This file contains Unicode characters which will be lost if\n"

View File

@ -9084,7 +9084,12 @@ msgstr "Unicode (UTF-16)"
msgid "Unicode (UTF-16 big-endian)"
msgstr "Unicode (UTF-16 big-endian)"
#: notepad.rc:101
#: notepad.rc:95
#, fuzzy
msgid "Unicode (UTF-8)"
msgstr "Unicode (UTF-16)"
#: notepad.rc:102
msgid ""
"%s\n"
"This file contains Unicode characters which will be lost if\n"

View File

@ -8340,7 +8340,12 @@ msgstr "یونی‌کد (UTF-16)"
msgid "Unicode (UTF-16 big-endian)"
msgstr "یونی‌کد (UTF-16 big-endian)"
#: notepad.rc:101
#: notepad.rc:95
#, fuzzy
msgid "Unicode (UTF-8)"
msgstr "یونی‌کد (UTF-16)"
#: notepad.rc:102
msgid ""
"%s\n"
"This file contains Unicode characters which will be lost if\n"

View File

@ -8586,7 +8586,11 @@ msgstr ""
msgid "Unicode (UTF-16 big-endian)"
msgstr ""
#: notepad.rc:101
#: notepad.rc:95
msgid "Unicode (UTF-8)"
msgstr ""
#: notepad.rc:102
msgid ""
"%s\n"
"This file contains Unicode characters which will be lost if\n"

View File

@ -8991,7 +8991,12 @@ msgstr "Unicode (UTF-16)"
msgid "Unicode (UTF-16 big-endian)"
msgstr "Unicode (UTF-16 big-endian)"
#: notepad.rc:101
#: notepad.rc:95
#, fuzzy
msgid "Unicode (UTF-8)"
msgstr "Unicode (UTF-16)"
#: notepad.rc:102
msgid ""
"%s\n"
"This file contains Unicode characters which will be lost if\n"

View File

@ -8718,7 +8718,12 @@ msgstr "יוניקוד (UTF-16)"
msgid "Unicode (UTF-16 big-endian)"
msgstr "יוניקוד (UTF-16 big-endian)"
#: notepad.rc:101
#: notepad.rc:95
#, fuzzy
msgid "Unicode (UTF-8)"
msgstr "יוניקוד (UTF-16)"
#: notepad.rc:102
msgid ""
"%s\n"
"This file contains Unicode characters which will be lost if\n"

View File

@ -8249,7 +8249,11 @@ msgstr ""
msgid "Unicode (UTF-16 big-endian)"
msgstr ""
#: notepad.rc:101
#: notepad.rc:95
msgid "Unicode (UTF-8)"
msgstr ""
#: notepad.rc:102
msgid ""
"%s\n"
"This file contains Unicode characters which will be lost if\n"

View File

@ -8797,7 +8797,11 @@ msgstr ""
msgid "Unicode (UTF-16 big-endian)"
msgstr ""
#: notepad.rc:101
#: notepad.rc:95
msgid "Unicode (UTF-8)"
msgstr ""
#: notepad.rc:102
msgid ""
"%s\n"
"This file contains Unicode characters which will be lost if\n"

View File

@ -9009,7 +9009,12 @@ msgstr "Unicode (UTF-16)"
msgid "Unicode (UTF-16 big-endian)"
msgstr "Unicode (UTF-16 big-endian)"
#: notepad.rc:101
#: notepad.rc:95
#, fuzzy
msgid "Unicode (UTF-8)"
msgstr "Unicode (UTF-16)"
#: notepad.rc:102
msgid ""
"%s\n"
"This file contains Unicode characters which will be lost if\n"

View File

@ -8710,7 +8710,12 @@ msgstr "Unicode (UTF-16)"
msgid "Unicode (UTF-16 big-endian)"
msgstr "Unicode (UTF-16 big-endian)"
#: notepad.rc:101
#: notepad.rc:95
#, fuzzy
msgid "Unicode (UTF-8)"
msgstr "Unicode (UTF-16)"
#: notepad.rc:102
msgid ""
"%s\n"
"This file contains Unicode characters which will be lost if\n"

View File

@ -8718,7 +8718,12 @@ msgstr "유니코드 (UTF-16)"
msgid "Unicode (UTF-16 big-endian)"
msgstr "유니코드 (UTF-16 빅-엔디언)"
#: notepad.rc:101
#: notepad.rc:95
#, fuzzy
msgid "Unicode (UTF-8)"
msgstr "유니코드 (UTF-16)"
#: notepad.rc:102
msgid ""
"%s\n"
"This file contains Unicode characters which will be lost if\n"

View File

@ -8691,7 +8691,12 @@ msgstr "Unikodas (UTF-16)"
msgid "Unicode (UTF-16 big-endian)"
msgstr "Unikodas (UTF-16 mažėjantys baitai)"
#: notepad.rc:101
#: notepad.rc:95
#, fuzzy
msgid "Unicode (UTF-8)"
msgstr "Unikodas (UTF-16)"
#: notepad.rc:102
msgid ""
"%s\n"
"This file contains Unicode characters which will be lost if\n"

View File

@ -8249,7 +8249,11 @@ msgstr ""
msgid "Unicode (UTF-16 big-endian)"
msgstr ""
#: notepad.rc:101
#: notepad.rc:95
msgid "Unicode (UTF-8)"
msgstr ""
#: notepad.rc:102
msgid ""
"%s\n"
"This file contains Unicode characters which will be lost if\n"

View File

@ -8910,7 +8910,12 @@ msgstr "Unicode (UTF-16)"
msgid "Unicode (UTF-16 big-endian)"
msgstr "Unicode (UTF-16 big-endian)"
#: notepad.rc:101
#: notepad.rc:95
#, fuzzy
msgid "Unicode (UTF-8)"
msgstr "Unicode (UTF-16)"
#: notepad.rc:102
msgid ""
"%s\n"
"This file contains Unicode characters which will be lost if\n"

View File

@ -8796,7 +8796,12 @@ msgstr "Unicode (UTF-16)"
msgid "Unicode (UTF-16 big-endian)"
msgstr "Unicode (UTF-16 big-endian)"
#: notepad.rc:101
#: notepad.rc:95
#, fuzzy
msgid "Unicode (UTF-8)"
msgstr "Unicode (UTF-16)"
#: notepad.rc:102
msgid ""
"%s\n"
"This file contains Unicode characters which will be lost if\n"

View File

@ -8249,7 +8249,11 @@ msgstr ""
msgid "Unicode (UTF-16 big-endian)"
msgstr ""
#: notepad.rc:101
#: notepad.rc:95
msgid "Unicode (UTF-8)"
msgstr ""
#: notepad.rc:102
msgid ""
"%s\n"
"This file contains Unicode characters which will be lost if\n"

View File

@ -8249,7 +8249,11 @@ msgstr ""
msgid "Unicode (UTF-16 big-endian)"
msgstr ""
#: notepad.rc:101
#: notepad.rc:95
msgid "Unicode (UTF-8)"
msgstr ""
#: notepad.rc:102
msgid ""
"%s\n"
"This file contains Unicode characters which will be lost if\n"

View File

@ -8950,7 +8950,12 @@ msgstr "Unicode (UTF-16)"
msgid "Unicode (UTF-16 big-endian)"
msgstr "Unicode (UTF-16 big-endian)"
#: notepad.rc:101
#: notepad.rc:95
#, fuzzy
msgid "Unicode (UTF-8)"
msgstr "Unicode (UTF-16)"
#: notepad.rc:102
msgid ""
"%s\n"
"This file contains Unicode characters which will be lost if\n"

View File

@ -8964,7 +8964,12 @@ msgstr "Unicode (UTF-16)"
msgid "Unicode (UTF-16 big-endian)"
msgstr "Unicode (UTF-16 big-endian)"
#: notepad.rc:101
#: notepad.rc:95
#, fuzzy
msgid "Unicode (UTF-8)"
msgstr "Unicode (UTF-16)"
#: notepad.rc:102
msgid ""
"%s\n"
"This file contains Unicode characters which will be lost if\n"

View File

@ -9022,7 +9022,12 @@ msgstr "Unicode (UTF-16)"
msgid "Unicode (UTF-16 big-endian)"
msgstr "Unicode (UTF-16 big-endian)"
#: notepad.rc:101
#: notepad.rc:95
#, fuzzy
msgid "Unicode (UTF-8)"
msgstr "Unicode (UTF-16)"
#: notepad.rc:102
msgid ""
"%s\n"
"This file contains Unicode characters which will be lost if\n"

View File

@ -8303,7 +8303,11 @@ msgstr ""
msgid "Unicode (UTF-16 big-endian)"
msgstr ""
#: notepad.rc:101
#: notepad.rc:95
msgid "Unicode (UTF-8)"
msgstr ""
#: notepad.rc:102
msgid ""
"%s\n"
"This file contains Unicode characters which will be lost if\n"

View File

@ -9265,7 +9265,12 @@ msgstr "Unicode (UTF-16)"
msgid "Unicode (UTF-16 big-endian)"
msgstr "Unicode (UTF-16 big-endian)"
#: notepad.rc:101
#: notepad.rc:95
#, fuzzy
msgid "Unicode (UTF-8)"
msgstr "Unicode (UTF-16)"
#: notepad.rc:102
msgid ""
"%s\n"
"This file contains Unicode characters which will be lost if\n"

View File

@ -8932,7 +8932,12 @@ msgstr "Юникод (UTF-16)"
msgid "Unicode (UTF-16 big-endian)"
msgstr "Юникод (UTF-16 big-endian)"
#: notepad.rc:101
#: notepad.rc:95
#, fuzzy
msgid "Unicode (UTF-8)"
msgstr "Юникод (UTF-16)"
#: notepad.rc:102
msgid ""
"%s\n"
"This file contains Unicode characters which will be lost if\n"

View File

@ -8521,7 +8521,11 @@ msgstr ""
msgid "Unicode (UTF-16 big-endian)"
msgstr ""
#: notepad.rc:101
#: notepad.rc:95
msgid "Unicode (UTF-8)"
msgstr ""
#: notepad.rc:102
msgid ""
"%s\n"
"This file contains Unicode characters which will be lost if\n"

View File

@ -9050,7 +9050,12 @@ msgstr "Unicode (UTF-16)"
msgid "Unicode (UTF-16 big-endian)"
msgstr "Unicode (UTF-16 big-endian)"
#: notepad.rc:101
#: notepad.rc:95
#, fuzzy
msgid "Unicode (UTF-8)"
msgstr "Unicode (UTF-16)"
#: notepad.rc:102
msgid ""
"%s\n"
"This file contains Unicode characters which will be lost if\n"

View File

@ -8630,7 +8630,12 @@ msgstr "Уникод (UTF-16)"
msgid "Unicode (UTF-16 big-endian)"
msgstr "Уникод (UTF-16 big-endian)"
#: notepad.rc:101
#: notepad.rc:95
#, fuzzy
msgid "Unicode (UTF-8)"
msgstr "Уникод (UTF-16)"
#: notepad.rc:102
msgid ""
"%s\n"
"This file contains Unicode characters which will be lost if\n"

View File

@ -8702,7 +8702,12 @@ msgstr "Unikod (UTF-16)"
msgid "Unicode (UTF-16 big-endian)"
msgstr "Unikod (UTF-16 big-endian)"
#: notepad.rc:101
#: notepad.rc:95
#, fuzzy
msgid "Unicode (UTF-8)"
msgstr "Unikod (UTF-16)"
#: notepad.rc:102
msgid ""
"%s\n"
"This file contains Unicode characters which will be lost if\n"

View File

@ -8754,7 +8754,12 @@ msgstr "Unicode (UTF-16)"
msgid "Unicode (UTF-16 big-endian)"
msgstr "Unicode (UTF-16 big-endian)"
#: notepad.rc:101
#: notepad.rc:95
#, fuzzy
msgid "Unicode (UTF-8)"
msgstr "Unicode (UTF-16)"
#: notepad.rc:102
msgid ""
"%s\n"
"This file contains Unicode characters which will be lost if\n"

View File

@ -8249,7 +8249,11 @@ msgstr ""
msgid "Unicode (UTF-16 big-endian)"
msgstr ""
#: notepad.rc:101
#: notepad.rc:95
msgid "Unicode (UTF-8)"
msgstr ""
#: notepad.rc:102
msgid ""
"%s\n"
"This file contains Unicode characters which will be lost if\n"

View File

@ -8387,7 +8387,11 @@ msgstr ""
msgid "Unicode (UTF-16 big-endian)"
msgstr ""
#: notepad.rc:101
#: notepad.rc:95
msgid "Unicode (UTF-8)"
msgstr ""
#: notepad.rc:102
msgid ""
"%s\n"
"This file contains Unicode characters which will be lost if\n"

View File

@ -9040,7 +9040,11 @@ msgstr ""
msgid "Unicode (UTF-16 big-endian)"
msgstr ""
#: notepad.rc:101
#: notepad.rc:95
msgid "Unicode (UTF-8)"
msgstr ""
#: notepad.rc:102
msgid ""
"%s\n"
"This file contains Unicode characters which will be lost if\n"

View File

@ -8885,7 +8885,12 @@ msgstr "Юнікод (UTF-16)"
msgid "Unicode (UTF-16 big-endian)"
msgstr "Юнікод (UTF-16 big-endian)"
#: notepad.rc:101
#: notepad.rc:95
#, fuzzy
msgid "Unicode (UTF-8)"
msgstr "Юнікод (UTF-16)"
#: notepad.rc:102
msgid ""
"%s\n"
"This file contains Unicode characters which will be lost if\n"

View File

@ -8355,7 +8355,11 @@ msgstr ""
msgid "Unicode (UTF-16 big-endian)"
msgstr ""
#: notepad.rc:101
#: notepad.rc:95
msgid "Unicode (UTF-8)"
msgstr ""
#: notepad.rc:102
msgid ""
"%s\n"
"This file contains Unicode characters which will be lost if\n"

View File

@ -8225,7 +8225,11 @@ msgstr ""
msgid "Unicode (UTF-16 big-endian)"
msgstr ""
#: notepad.rc:101
#: notepad.rc:95
msgid "Unicode (UTF-8)"
msgstr ""
#: notepad.rc:102
msgid ""
"%s\n"
"This file contains Unicode characters which will be lost if\n"

View File

@ -8628,7 +8628,12 @@ msgstr "Unicode (UTF-16)"
msgid "Unicode (UTF-16 big-endian)"
msgstr "Unicode (UTF-16 大尾)"
#: notepad.rc:101
#: notepad.rc:95
#, fuzzy
msgid "Unicode (UTF-8)"
msgstr "Unicode (UTF-16)"
#: notepad.rc:102
msgid ""
"%s\n"
"This file contains Unicode characters which will be lost if\n"

View File

@ -8690,7 +8690,11 @@ msgstr ""
msgid "Unicode (UTF-16 big-endian)"
msgstr ""
#: notepad.rc:101
#: notepad.rc:95
msgid "Unicode (UTF-8)"
msgstr ""
#: notepad.rc:102
msgid ""
"%s\n"
"This file contains Unicode characters which will be lost if\n"

View File

@ -58,13 +58,21 @@ static void load_encoding_name(ENCODING enc, WCHAR* buffer, int length)
LoadStringW(Globals.hInstance, STRING_UNICODE_BE, buffer, length);
break;
default:
case ENCODING_UTF8:
LoadStringW(Globals.hInstance, STRING_UTF8, buffer, length);
break;
case ENCODING_ANSI:
{
CPINFOEXW cpi;
GetCPInfoExW((enc==ENCODING_UTF8) ? CP_UTF8 : CP_ACP, 0, &cpi);
GetCPInfoExW(CP_ACP, 0, &cpi);
lstrcpynW(buffer, cpi.CodePageName, length);
break;
}
default:
assert(0 && "bad encoding in load_encoding_name");
break;
}
}

View File

@ -92,6 +92,7 @@ task.\nClose one or more applications to increase the amount of free memory."
STRING_UNICODE_LE, "Unicode (UTF-16)"
STRING_UNICODE_BE, "Unicode (UTF-16 big-endian)"
STRING_UTF8, "Unicode (UTF-8)"
STRING_LOSS_OF_UNICODE_CHARACTERS, "%s\n\
This file contains Unicode characters which will be lost if\n\

View File

@ -87,8 +87,9 @@
#define STRING_UNICODE_LE 0x180
#define STRING_UNICODE_BE 0x181
#define STRING_UTF8 0x182
#define STRING_LOSS_OF_UNICODE_CHARACTERS 0x182
#define STRING_LOSS_OF_UNICODE_CHARACTERS 0x183
/* Open/Save As dialog template */
#define IDD_OFN_TEMPLATE 0x190