Windows code pages are sets of characters or code pages (known as character encodings in other operating systems) used in Microsoft Windows from the 1980s and 1990s. Windows code pages were gradually superseded when Unicode was implemented in Windows,[citation needed] although they are still supported both within Windows and other platforms, and still apply when Alt code shortcuts are used.
Current Windows versions support Unicode, new Windows applications should use Unicode (UTF-8) and not 8-bit character encodings.[1]
There are two groups of system code pages in Windows systems: OEM and Windows-native («ANSI») code pages.
(ANSI is the American National Standards Institute.) Code pages in both of these groups are extended ASCII code pages. Additional code pages are supported by standard Windows conversion routines, but not used as either type of system code page.
Alias(es) | ANSI (misnomer) |
---|---|
Standard | WHATWG Encoding Standard |
Extends | ASCII |
Preceded by | ISO 8859 |
Succeeded by | Unicode UTF-16 (in Win32 API) UTF-8 (for files) |
ANSI code pages (officially called «Windows code pages»[2] after Microsoft accepted the former term being a misnomer[3]) are used for native non-Unicode (say, byte oriented) applications using a graphical user interface on Windows systems. The term «ANSI» is a misnomer because these Windows code pages do not comply with any ANSI (American National Standards Institute) standard; code page 1252 was based on an early ANSI draft that became the international standard ISO 8859-1,[3] which adds a further 32 control codes and space for 96 printable characters. Among other differences, Windows code-pages allocate printable characters to the supplementary control code space, making them at best illegible to standards-compliant operating systems.)
Most legacy «ANSI» code pages have code page numbers in the pattern 125x. However, 874 (Thai) and the East Asian multi-byte «ANSI» code pages (932, 936, 949, 950), all of which are also used as OEM code pages, are numbered to match IBM encodings, none of which are identical to the Windows encodings (although most are similar). While code page 1258 is also used as an OEM code page, it is original to Microsoft rather than an extension to an existing encoding. IBM have assigned their own, different numbers for Microsoft’s variants, these are given for reference in the lists below where applicable.
All of the 125x Windows code pages, as well as 874 and 936, are labelled by Internet Assigned Numbers Authority (IANA) as «Windows-number«, although «Windows-936» is treated as a synonym for «GBK». Windows code page 932 is instead labelled as «Windows-31J».[4]
ANSI Windows code pages, and especially the code page 1252, were so called since they were purportedly based on drafts submitted or intended for ANSI. However, ANSI and ISO have not standardized any of these code pages. Instead they are either:[3]
- Supersets of the standard sets such as those of ISO 8859 and the various national standards (like Windows-1252 vs. ISO-8859-1),
- Major modifications of these (making them incompatible to various degrees, like Windows-1250 vs. ISO-8859-2)
- Having no parallel encoding (like Windows-1257 vs. ISO-8859-4; ISO-8859-13 was introduced much later). Also, Windows-1251 follows neither the ISO-standardised ISO-8859-5 nor the then-prevailing KOI-8.
Microsoft assigned about twelve of the typography and business characters (including notably, the euro sign, €) in CP1252 to the code points 0x80–0x9F that, in ISO 8859, are assigned to C1 control codes. These assignments are also present in many other ANSI/Windows code pages at the same code-points. Windows did not use the C1 control codes, so this decision had no direct effect on Windows users. However, if included in a file transferred to a standards-compliant platform like Unix or MacOS, the information was invisible and potentially disruptive.[citation needed]
The OEM code pages (original equipment manufacturer) are used by Win32 console applications, and by virtual DOS, and can be considered a holdover from DOS and the original IBM PC architecture. A separate suite of code pages was implemented not only due to compatibility, but also because the fonts of VGA (and descendant) hardware suggest encoding of line-drawing characters to be compatible with code page 437. Most OEM code pages share many code points, particularly for non-letter characters, with the second (non-ASCII) half of CP437.
A typical OEM code page, in its second half, does not resemble any ANSI/Windows code page even roughly. Nevertheless, two single-byte, fixed-width code pages (874 for Thai and 1258 for Vietnamese) and four multibyte CJK code pages (932, 936, 949, 950) are used as both OEM and ANSI code pages. Code page 1258 uses combining diacritics, as Vietnamese requires more than 128 letter-diacritic combinations. This is in contrast to VISCII, which replaces some of the C0 (i.e. ASCII) control codes.
Early computer systems had limited storage and restricted the number of bits available to encode a character. Although earlier proprietary encodings had fewer, the American Standard Code for Information Interchange (ASCII) settled on seven bits: this was sufficient to encode a 96 member subset of the characters used in the US. As eight-bit bytes came to predominate, Microsoft (and others) expanded the repertoire to 224, to handle a variety of other uses such a box-drawing symbols. The need to provide precomposed characters for the Western European and South American markets required a different character set: Microsoft established the principle of code pages, one for each alphabet. For the segmental scripts used in most of Africa, the Americas, southern and south-east Asia, the Middle East and Europe, a character needs just one byte but two or more bytes are needed for the ideographic sets used in the rest of the world. The code-page model was unable to handle this challenge.
Since the late 1990s, software and systems have adopted Unicode as their preferred character encoding format: Unicode is designed to handle millions of characters. All current Microsoft products and application program interfaces use Unicode internally,[citation needed] but some applications continue to use the default encoding[clarification needed] of the computer’s ‘locale’ when reading and writing text data to files or standard output.[citation needed] Therefore, files may still be encountered that are legible and intelligible in one part of the world but unintelligible mojibake in another.
Microsoft adopted a Unicode encoding (first the now-obsolete UCS-2, which was then Unicode’s only encoding), i.e. UTF-16 for all its operating systems from Windows NT onwards, but additionally supports UTF-8 (aka CP_UTF8
) since Windows 10 version 1803.[5]
UTF-16 uniquely encodes all Unicode characters in the Basic Multilingual Plane (BMP) using 16 bits but the remaining Unicode (e.g. emojis) is encoded with a 32-bit (four byte) code – while the rest of the industry (Unix-like systems and the web), and now Microsoft chose UTF-8 (which uses one byte for the 7-bit ASCII character set, two or three bytes for other characters in the BMP, and four bytes for the remainder).
The following Windows code pages exist:
These nine code pages are all extended ASCII 8-bit SBCS encodings, and were designed by Microsoft for use as ANSI codepages on Windows. They are commonly known by their IANA-registered[6] names as windows-<number>
, but are also sometimes called cp<number>
, «cp» for «code page». They are all used as ANSI code pages; Windows-1258 is also used as an OEM code page.
The Windows-125x series includes nine of the ANSI code pages, and mostly covers scripts from Europe and West Asia with the addition of Vietnam. System encodings for Thai and for East Asian languages were numbered to match similar IBM code pages and are used as both ANSI and OEM code pages; these are covered in following sections.
ID | Description | Relationship to ISO 8859 or other established encodings |
---|---|---|
1250[7][8] | Latin 2 / Central European | Similar to ISO-8859-2 but moves several characters, including multiple letters. |
1251[9][10] | Cyrillic | Incompatible with both ISO-8859-5 and KOI-8. |
1252[11][12] | Latin 1 / Western European | Superset of ISO-8859-1 (without C1 controls). Letter repertoire accordingly similar to CP850. |
1253[13][14] | Greek | Similar to ISO 8859-7 but moves several characters, including a letter. |
1254[15][16] | Turkish | Superset of ISO 8859-9 (without C1 controls). |
1255[17][18] | Hebrew | Almost a superset of ISO 8859-8, but with two incompatible punctuation changes. |
1256[19][20] | Arabic | Not compatible with ISO 8859-6; rather, OEM Code page 708 is an ISO 8859-6 (ASMO 708) superset. |
1257[21][22] | Baltic | Not ISO 8859-4; the later ISO 8859-13 is closely related, but with some differences in available punctuation. |
1258[23][24] | Vietnamese (also OEM) | Not related to VSCII or VISCII, uses fewer base characters with combining diacritics. |
These are also ASCII-based. Most of these are included for use as OEM code pages; code page 874 is also used as an ANSI code page.
- 437 – IBM PC US, 8-bit SBCS extended ASCII.[25] Known as OEM-US, the encoding of the primary built-in font of VGA graphics cards.
- 708 – Arabic, extended ISO 8859-6 (ASMO 708)
- 720 – Arabic, retaining box drawing characters in their usual locations
- 737 – «MS-DOS Greek». Retains all box drawing characters. More popular than 869.
- 775 – «MS-DOS Baltic Rim»
- 850 – «MS-DOS Latin 1». Full (re-arranged) repertoire of ISO 8859-1.
- 852 – «MS-DOS Latin 2»
- 855 – «MS-DOS Cyrillic». Mainly used for South Slavic languages. Includes (re-arranged) repertoire of ISO-8859-5. Not to be confused with cp866.
- 857 – «MS-DOS Turkish»
- 858 – Western European with euro sign
- 860 – «MS-DOS Portuguese»
- 861 – «MS-DOS Icelandic»
- 862 – «MS-DOS Hebrew»
- 863 – «MS-DOS French Canada»
- 864 – Arabic
- 865 – «MS-DOS Nordic»
- 866 – «MS-DOS Cyrillic Russian», cp866. Sole purely OEM code page (rather than ANSI or both) included as a legacy encoding in WHATWG Encoding Standard for HTML5.
- 869 – «MS-DOS Greek 2», IBM869. Full (re-arranged) repertoire of ISO 8859-7.
- 874 – Thai, also used as the ANSI code page, extends ISO 8859-11 (and therefore TIS-620) with a few additional characters from Windows-1252. Corresponds to IBM code page 1162 (IBM-874 is similar but has different extensions).
East Asian multi-byte code pages
edit
These often differ from the IBM code pages of the same number: code pages 932, 949 and 950 only partly match the IBM code pages of the same number, while the number 936 was used by IBM for another Simplified Chinese encoding which is now deprecated and Windows-951, as part of a kludge, is unrelated to IBM-951. IBM equivalent code pages are given in the second column. Code pages 932, 936, 949 and 950/951 are used as both ANSI and OEM code pages on the locales in question.
ID | Language | Encoding | IBM Equivalent | Difference from IBM CCSID of same number | Use |
---|---|---|---|---|---|
932 | Japanese | Shift JIS (Microsoft variant) | 943[26] | IBM-932 is also Shift JIS, has fewer extensions (but those extensions it has are in common), and swaps some variant Chinese characters (itaiji) for interoperability with earlier editions of JIS C 6226. | ANSI/OEM (Japan) |
936 | Chinese (simplified) | GBK | 1386 | IBM-936 is a different Simplified Chinese encoding with a different encoding method, which has been deprecated since 1993. | ANSI/OEM (PRC, Singapore) |
949 | Korean | Unified Hangul Code | 1363 | IBM-949 is also an EUC-KR superset, but with different (colliding) extensions. | ANSI/OEM (Republic of Korea) |
950 | Chinese (traditional) | Big5 (Microsoft variant) | 1373[27] | IBM-950 is also Big5, but includes a different subset of the ETEN extensions, adds further extensions with an expanded trail byte range, and lacks the Euro. | ANSI/OEM (Taiwan, Hong Kong) |
951 | Chinese (traditional) including Cantonese | Big5-HKSCS (2001 ed.) | 5471[28] | IBM-951 is the double-byte plane from IBM-949 (see above), and unrelated to Microsoft’s internal use of the number 951. | ANSI/OEM (Hong Kong, 98/NT4/2000/XP with HKSCS patch) |
A few further multiple-byte code pages are supported for decoding or encoding using operating system libraries, but not used as either sort of system encoding in any locale.
ID | IBM Equivalent | Language | Encoding | Use |
---|---|---|---|---|
1361 | — | Korean | Johab (KS C 5601-1992 annex 3) | Conversion |
20000 | — | Chinese (traditional) | An encoding of CNS 11643 | Conversion |
20001 | — | Chinese (traditional) | TCA | Conversion |
20002 | — | Chinese (traditional) | Big5 (ETEN variant) | Conversion |
20003 | 938 | Chinese (traditional) | IBM 5550 | Conversion |
20004 | — | Chinese (traditional) | Teletext | Conversion |
20005 | — | Chinese (traditional) | Wang | Conversion |
20932 | 954 (roughly) | Japanese | EUC-JP | Conversion |
20936 | 5479 | Chinese (simplified) | GB 2312 | Conversion |
20949, 51949 | 970 | Korean | Wansung (8-bit with ASCII, i.e. EUC-KR)[29] | Conversion |
ID | IBM Equivalent | Description |
---|---|---|
37 | Country Extended Code Page for US, Canada, Netherlands, Portugal, Brazil, Australia, New Zealand[30] | |
500 | Country Extended Code Page for Belgium, Canada and Switzerland | |
870 | EBCDIC Latin-2 | |
875 | EBCDIC Greek | |
1026 | EBCDIC Latin-5 (Turkish) | |
1047 | Country Extended Code Page for Open Systems (POSIX) | |
1140 | Euro-sign Country Extended Code Page for US, Canada, Netherlands, Portugal, Brazil, Australia, New Zealand | |
1141 | Euro-sign Country Extended Code Page for Austria and Germany | |
1142 | Euro-sign Country Extended Code Page for Denmark and Norway | |
1143 | Euro-sign Country Extended Code Page for Finland and Sweden | |
1144 | Euro-sign Country Extended Code Page for Italy | |
1145 | Euro-sign Country Extended Code Page for Spain and Latin America | |
1146 | Euro-sign Country Extended Code Page for UK | |
1147 | Euro-sign Country Extended Code Page for France | |
1148 | Euro-sign Country Extended Code Page for Belgium, Canada and Switzerland | |
1149 | Euro-sign Country Extended Code Page for Iceland | |
20273 | 273 | Country Extended Code Page for Germany |
20277 | 277 | Country Extended Code Page for Denmark/Norway |
20278 | 278 | Country Extended Code Page for Finland/Sweden |
20280 | 280 | Country Extended Code Page for Italy |
20284 | 284 | Country Extended Code Page for Latin America/Spain |
20285 | 285 | Country Extended Code Page for United Kingdom |
20290 | 290 | Japanese Katakana EBCDIC |
20297 | 297 | Country Extended Code Page for France |
20420 | 420 | EBCDIC Arabic |
20423 | 423 | EBCDIC Greek with Extended Latin |
20424 | — | x-EBCDIC-KoreanExtended |
20833 | 833 | Korean EBCDIC for N-Byte Hangul |
20838 | 838 | EBCDIC Thai |
20871 | 871 | Country Extended Code Page for Iceland |
20880 | 880 | EBCDIC Cyrillic (DKOI) |
20905 | 905 | EBCDIC Latin-3 (Maltese, Esperanto and Turkish) |
20924 | 924 | EBCDIC Latin-9 (including Euro sign) for Open Systems (POSIX) |
21025 | 1025 | EBCDIC Cyrillic (DKOI) with section sign |
21027 | (1027) | Japanese EBCDIC (an incomplete implementation of IBM code page 1027,[31] now deprecated)[32] |
ID | IBM Equivalent | Description |
---|---|---|
1200 | 1202, 1203 | Unicode (BMP of ISO 10646, UTF-16LE). Available only to managed applications.[32] |
1201 | 1200, 1201 | Unicode (UTF-16BE). Available only to managed applications.[32] |
12000 | 1234, 1235 | UTF-32. Available only to managed applications.[32] |
12001 | 1232, 1233 | UTF-32. Big-endian. Available only to managed applications.[32] |
65000 | — | Unicode (UTF-7) |
65001 | 1208, 1209 | Unicode (UTF-8) |
Macintosh compatibility code pages
edit
ID | IBM Equivalent | Description |
---|---|---|
10000 | 1275 | Apple Macintosh Roman |
10001 | — | Apple Macintosh Japanese |
10002 | — | Apple Macintosh Chinese (traditional) (BIG-5) |
10003 | — | Apple Macintosh Korean |
10004 | — | Apple Macintosh Arabic |
10005 | — | Apple Macintosh Hebrew |
10006 | 1280 | Apple Macintosh Greek |
10007 | 1283 | Apple Macintosh Cyrillic |
10008 | — | Apple Macintosh Chinese (simplified) (GB 2312) |
10010 | 1285 | Apple Macintosh Romanian |
10017 | — | Apple Macintosh Ukrainian |
10021 | — | Apple Macintosh Thai |
10029 | 1282 | Apple Macintosh Roman II / Central Europe |
10079 | 1286 | Apple Macintosh Icelandic |
10081 | 1281 | Apple Macintosh Turkish |
10082 | 1284 | Apple Macintosh Croatian |
ID | IBM Equivalent | Description |
---|---|---|
28591 | 819, 5100 | ISO-8859-1 – Latin-1 |
28592 | 912 | ISO-8859-2 – Latin-2 |
28593 | 913 | ISO-8859-3 – Latin-3 or South European |
28594 | 914 | ISO-8859-4 – Latin-4 or North European |
28595 | 915 | ISO-8859-5 – Latin/Cyrillic |
28596 | — | ISO-8859-6 – Latin/Arabic |
28597 | 813, 4909, 9005 | ISO-8859-7 – Latin/Greek (1987 edition, i.e. without euro sign, drachma sign or iota subscript)[33] |
28598 | — | ISO-8859-8 – Latin/Hebrew (visual order; 1988 edition, i.e. without LRM and RLM)[33] |
28599 | 920 | ISO-8859-9 – Latin-5 or Turkish |
28600 | 919 | ISO-8859-10 – Latin-6 or Nordic |
28601 | — | ISO-8859-11 – Latin/Thai |
28602 | — | ISO-8859-12 – reserved for Latin/Devanagari but abandoned (not supported) |
28603 | 921 | ISO-8859-13 – Latin-7 or Baltic Rim |
28604 | — | ISO-8859-14 – Latin-8 or Celtic |
28605 | 923 | ISO-8859-15 – Latin-9 |
28606 | — | ISO-8859-16 – Latin-10 or South-Eastern European |
38596 | 1089 | ISO-8859-6-I – Latin/Arabic (logical bidirectional order) |
38598 | 916, 5012 | ISO-8859-8-I – Latin/Hebrew (logical bidirectional order; 1988 edition, i.e. without LRM and RLM)[33] |
ID | IBM Equivalent | Description |
---|---|---|
20105 | 1009 | 7-bit IA5 IRV (Western European)[34][35][36] |
20106 | 1011 | 7-bit IA5 German (DIN 66003)[34][35][37] |
20107 | 1018 | 7-bit IA5 Swedish (SEN 850200 C)[34][35][38] |
20108 | 1016 | 7-bit IA5 Norwegian (NS 4551-2)[34][35][39] |
20127 | 367 | 7-bit ASCII[34][35][40] |
20261 | 1036 | T.61 (T.61-8bit) |
20269 | ? | ISO-6937 |
ID | IBM Equivalent | Description |
---|---|---|
20866 | 878 | Russian – KOI8-R |
21866 | 1167, 1168 | Ukrainian – KOI8-U (or KOI8-RU in some versions)[41] |
Problems arising from the use of code pages
edit
Microsoft strongly recommends using Unicode in modern applications, but many applications or data files still depend on the legacy code pages.
- Programs need to know what code page to use in order to display the contents of (pre-Unicode) files correctly. If a program uses the wrong code page it may show text as mojibake.
- The code page in use may differ between machines, so (pre-Unicode) files created on one machine may be unreadable on another.
- Data is often improperly tagged with the code page, or not tagged at all, making determination of the correct code page to read the data difficult.
- These Microsoft code pages differ to various degrees from some of the standards and other vendors’ implementations. This isn’t a Microsoft issue per se, as it happens to all vendors, but the lack of consistency makes interoperability with other systems unreliable in some cases.
- The use of code pages limits the set of characters that may be used.
- Characters expressed in an unsupported code page may be converted to question marks (?) or other replacement characters, or to a simpler version (such as removing accents from a letter). In either case, the original character may be lost.
- AppLocale – a utility to run non-Unicode (code page-based) applications in a locale of the user’s choice.
- ^ «Unicode and character sets». Microsoft. 2023-06-13. Retrieved 2024-05-27.
- ^ «Code Pages». 2016-03-07. Archived from the original on 2016-03-07. Retrieved 2021-05-26.
- ^ a b c «Glossary of Terms Used on this Site». December 8, 2018. Archived from the original on 2018-12-08.
The term «ANSI» as used to signify Windows code pages is a historical reference, but is nowadays a misnomer that continues to persist in the Windows community. The source of this comes from the fact that the Windows code page 1252 was originally based on an ANSI draft—which became International Organization for Standardization (ISO) Standard 8859-1. «ANSI applications» are usually a reference to non-Unicode or code page–based applications.
- ^ «Character Sets». www.iana.org. Archived from the original on 2021-05-25. Retrieved 2021-05-26.
- ^ hylom (2017-11-14). «Windows 10のInsider PreviewでシステムロケールをUTF-8にするオプションが追加される» [The option to make UTF-8 the system locale added in Windows 10 Insider Preview]. スラド (in Japanese). Archived from the original on 2018-05-11. Retrieved 2018-05-10.
- ^ «Character Sets». IANA. Archived from the original on 2016-12-03. Retrieved 2019-04-07.
- ^ Microsoft. «Windows 1250». Archived from the original on 2014-07-14. Retrieved 2014-07-06.
- ^ IBM. «SBCS code page information document CPGID 01250». Archived from the original on 2014-07-14. Retrieved 2014-07-06.
- ^ Microsoft. «Windows 1251». Archived from the original on 2014-07-14. Retrieved 2014-07-06.
- ^ IBM. «SBCS code page information document CPGID 01251». Archived from the original on 2014-07-14. Retrieved 2014-07-06.
- ^ Microsoft. «Windows 1252». Archived from the original on 2013-05-04. Retrieved 2014-07-06.
- ^ IBM. «SBCS code page information document CPGID 01252». Archived from the original on 2014-07-14. Retrieved 2014-07-06.
- ^ Microsoft. «Windows 1253». Archived from the original on 2014-07-14. Retrieved 2014-07-06.
- ^ IBM. «SBCS code page information document CPGID 01253». Archived from the original on 2014-07-14. Retrieved 2014-07-06.
- ^ Microsoft. «Windows 1254». Archived from the original on 2014-07-14. Retrieved 2014-07-06.
- ^ IBM. «SBCS code page information document CPGID 01254». Archived from the original on 2014-07-14. Retrieved 2014-07-06.
- ^ Microsoft. «Windows 1255». Archived from the original on 2014-07-14. Retrieved 2014-07-06.
- ^ IBM. «SBCS code page information document CPGID 01255». Archived from the original on 2014-07-14. Retrieved 2014-07-06.
- ^ Microsoft. «Windows 1256». Archived from the original on 2014-07-14. Retrieved 2014-07-06.
- ^ IBM. «SBCS code page information document CPGID 01256». Archived from the original on 2014-07-14. Retrieved 2014-07-06.
- ^ Microsoft. «Windows 1257». Archived from the original on 2013-03-16. Retrieved 2014-07-06.
- ^ IBM. «SBCS code page information document CPGID 01257». Archived from the original on 2014-07-14. Retrieved 2014-07-06.
- ^ Microsoft. «Windows 1258». Archived from the original on 2013-10-25. Retrieved 2014-07-06.
- ^ IBM. «SBCS code page information document CPGID 01258». Archived from the original on 2014-07-14. Retrieved 2014-07-06.
- ^ IBM. «SBCS code page information document — CPGID 00437». Archived from the original on 2016-06-09. Retrieved 2014-07-04.
- ^ «IBM-943 and IBM-932». IBM Knowledge Center. IBM. Archived from the original on 2018-08-18. Retrieved 2020-07-08.
- ^ «Converter Explorer: ibm-1373_P100-2002». ICU Demonstration. International Components for Unicode. Archived from the original on 2021-05-26. Retrieved 2020-06-27.
- ^ «Coded character set identifiers – CCSID 5471». IBM Globalization. IBM. Archived from the original on 2014-11-29.
- ^ Julliard, Alexandre (11 March 2021). «dump_krwansung_codepage: build Korean Wansung table from the KSX1001 file». make_unicode: Generate code page .c files from ftp.unicode.org descriptions. Wine Project. Archived from the original on 2021-05-26. Retrieved 2021-03-14.
- ^ IBM. «SBCS code page information document — CPGID 00037». Archived from the original on 2014-07-14. Retrieved 2014-07-04.
- ^ Steele, Shawn (2005-09-12). «Code Page 21027 «Extended/Ext Alpha Lowercase»«. MSDN. Archived from the original on 2019-04-06. Retrieved 2019-04-06.
- ^ a b c d e «Code Page Identifiers». docs.microsoft.com. Archived from the original on 2019-04-07. Retrieved 2019-04-07.
- ^ a b c Mozilla Foundation. «Relationship with Windows Code Pages». Crate encoding_rs. Docs.rs.
- ^ a b c d e «Code Page Identifiers». Microsoft Developer Network. Microsoft. 2014. Archived from the original on 2016-06-19. Retrieved 2016-06-19.
- ^ a b c d e «Web Encodings — Internet Explorer — Encodings». WHATWG Wiki. 2012-10-23. Archived from the original on 2016-06-20. Retrieved 2016-06-20.
- ^ Foller, Antonin (2014) [2011]. «Western European (IA5) encoding — Windows charsets». WUtils.com — Online web utility and help. Motobit Software. Archived from the original on 2016-06-20. Retrieved 2016-06-20.
- ^ Foller, Antonin (2014) [2011]. «German (IA5) encoding – Windows charsets». WUtils.com – Online web utility and help. Motobit Software. Archived from the original on 2016-06-20. Retrieved 2016-06-20.
- ^ Foller, Antonin (2014) [2011]. «Swedish (IA5) encoding — Windows charsets». WUtils.com — Online web utility and help. Motobit Software. Archived from the original on 2016-06-20. Retrieved 2016-06-20.
- ^ Foller, Antonin (2014) [2011]. «Norwegian (IA5) encoding — Windows charsets». WUtils.com — Online web utility and help. Motobit Software. Archived from the original on 2016-06-20. Retrieved 2016-06-20.
- ^ Foller, Antonin (2014) [2011]. «US-ASCII encoding — Windows charsets». WUtils.com — Online web utility and help. Motobit Software. Archived from the original on 2016-06-20. Retrieved 2016-06-20.
- ^ Nechayev, Valentin (2013) [2001]. «Review of 8-bit Cyrillic encodings universe». Archived from the original on 2016-12-05. Retrieved 2016-12-05.
- National Language Support (NLS) API Reference. Table showing ANSI and OEM codepages per language (from web-archive since Microsoft removed the original page)
- IANA Charset Name Registrations
- Unicode mapping table for Windows code pages
- Unicode mappings of windows code pages with «best fit»
Текущая версия страницы пока не проверялась опытными участниками и может значительно отличаться от версии, проверенной 18 июня 2016; проверки требуют 48 правок.
Windows-1251 — набор символов и кодировка, являющаяся стандартной 8-битной кодировкой для русских версий Microsoft Windows до 10-й версии. В прошлом пользовалась довольно большой популярностью. Была создана на базе кодировок, использовавшихся в ранних «самопальных» русификаторах Windows в 1990—1991 гг. совместно представителями «Параграфа», «Диалога» и российского отделения Microsoft. Первоначальный вариант кодировки сильно отличался от представленного ниже в таблице (в частности, там было значительное число «белых пятен»). Но, однако был вариативным и представленным в 6 формах применения.
В современных приложениях отдается предпочтение Юникоду (UTF-8). На 1 апреля 2019 лишь на 1 % всех веб-страниц используется Windows-1251.[1]
ОсобенностиПравить
Windows-1251 выгодно отличается от других 8‑битных кириллических кодировок (таких как CP866, KOI8-R и ISO 8859-5) наличием практически всех символов, использующихся в русской типографике для обычного текста (отсутствует только значок ударения); Она также содержит все символы для других славянских языков: украинского, белорусского, сербского, македонского и болгарского.
Windows-1251 имеет два недостатка:
- строчная буква «я» имеет код 0xFF (255 в десятичной системе). Она является «виновницей» ряда неожиданных проблем в программах без поддержки чистого 8-го бита, а также (гораздо более частый случай) использующих этот код как служебный (в CP437 он обозначает «неразрывный пробел», в Windows-1252 — ÿ, оба варианта практически не используются; число же
-1
, в дополнительном коде длиной 8 бит представляющееся числом255
, часто используется в программировании как специальное значение). Тот же недостаток имеет и KOI8-R, но в ней 0xFF есть заглавный твердый знак, который применяется редко (только при написании одними лишь заглавными буквами). - отсутствуют символы псевдографики, имеющиеся в CP866 и KOI8 (хотя для самих Windows, для которых она предназначена, в них не было нужды, это делало несовместимость двух использовавшихся в них кодировок заметнее).
Также как недостаток может рассматриваться отдельное расположение буквы «ё», тогда как остальные символы расположены строго в алфавитном порядке. Это усложняет программы лексикографического упорядочения.
Синонимы: CP1251; ANSI (только в русскоязычной ОС Windows).
ТаблицыПравить
Нижняя часть таблицы кодировки (латиница) полностью соответствует кодировке ASCII. Числа под буквами обозначают шестнадцатеричный код подходящего символа в Юникоде.
Кодировка Windows-1251Править
.0 | .1 | .2 | .3 | .4 | .5 | .6 | .7 | .8 | .9 | .A | .B | .C | .D | .E | .F | |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
8. |
Ђ 402 |
Ѓ 403 |
‚ 201A |
ѓ 453 |
„ 201E |
… 2026 |
† 2020 |
‡ 2021 |
€ 20AC |
‰ 2030 |
Љ 409 |
‹ 2039 |
Њ 40A |
Ќ 40C |
Ћ 40B |
Џ 40F |
9. |
ђ 452 |
‘ 2018 |
’ 2019 |
“ 201C |
” 201D |
• 2022 |
– 2013 |
— 2014 |
™ 2122 |
љ 459 |
› 203A |
њ 45A |
ќ 45C |
ћ 45B |
џ 45F |
|
A. |
A0 |
Ў 40E |
ў 45E |
Ј 408 |
¤ A4 |
Ґ 490 |
¦ A6 |
§ A7 |
Ё 401 |
© A9 |
Є 404 |
« AB |
¬ AC |
AD |
® AE |
Ї 407 |
B. |
° B0 |
± B1 |
І 406 |
і 456 |
ґ 491 |
µ B5 |
¶ B6 |
· B7 |
ё 451 |
№ 2116 |
є 454 |
» BB |
ј 458 |
Ѕ 405 |
ѕ 455 |
ї 457 |
C. |
А 410 |
Б 411 |
В 412 |
Г 413 |
Д 414 |
Е 415 |
Ж 416 |
З 417 |
И 418 |
Й 419 |
К 41A |
Л 41B |
М 41C |
Н 41D |
О 41E |
П 41F |
D. |
Р 420 |
С 421 |
Т 422 |
У 423 |
Ф 424 |
Х 425 |
Ц 426 |
Ч 427 |
Ш 428 |
Щ 429 |
Ъ 42A |
Ы 42B |
Ь 42C |
Э 42D |
Ю 42E |
Я 42F |
E. |
а 430 |
б 431 |
в 432 |
г 433 |
д 434 |
е 435 |
ж 436 |
з 437 |
и 438 |
й 439 |
к 43A |
л 43B |
м 43C |
н 43D |
о 43E |
п 43F |
F. |
р 440 |
с 441 |
т 442 |
у 443 |
ф 444 |
х 445 |
ц 446 |
ч 447 |
ш 448 |
щ 449 |
ъ 44A |
ы 44B |
ь 44C |
э 44D |
ю 44E |
я 44F |
-
Таблица основного кода ASCII
-
Таблица расширенного кода ASCII
Другие вариантыПравить
(Показаны только отличающиеся строки, поскольку всё остальное совпадает)
Официальная кодировка Amiga-1251 (Amiga Inc., 2004 г.)Править
.0 | .1 | .2 | .3 | .4 | .5 | .6 | .7 | .8 | .9 | .A | .B | .C | .D | .E | .F | |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
A. |
A0 |
¡ A1 |
¢ A2 |
£ A3 |
€ 20AC |
¥ A5 |
¦ A6 |
§ A7 |
Ё 401 |
© A9 |
№ 2116 |
« AB |
¬ AC |
AD |
® AE |
¯ AF |
B. |
° B0 |
± B1 |
² B2 |
³ B3 |
´ B4 |
µ B5 |
¶ B6 |
· B7 |
ё 451 |
¹ B9 |
º BA |
» BB |
¼ BC |
½ BD |
¾ BE |
¿ BF |
Официальная кодировка KZ-1048 (казахский стандарт)Править
Данная кодировка утверждена стандартом СТ РК 1048—2002 и зарегистрирована в IANA как KZ-1048 [1].
.0 | .1 | .2 | .3 | .4 | .5 | .6 | .7 | .8 | .9 | .A | .B | .C | .D | .E | .F | |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
8. |
Ђ 402 |
Ѓ 403 |
‚ 201A |
ѓ 453 |
„ 201E |
… 2026 |
† 2020 |
‡ 2021 |
€ 20AC |
‰ 2030 |
Љ 409 |
‹ 2039 |
Њ 40A |
Қ 49A |
Һ 4BA |
Џ 40F |
9. |
ђ 452 |
‘ 2018 |
’ 2019 |
“ 201C |
” 201D |
• 2022 |
– 2013 |
— 2014 |
™ 2122 |
љ 459 |
› 203A |
њ 45A |
қ 49B |
һ 4BB |
џ 45F |
|
A. |
A0 |
Ұ 4B0 |
ұ 4B1 |
Ә 4D8 |
¤ A4 |
Ө 4E8 |
¦ A6 |
§ A7 |
Ё 401 |
© A9 |
Ғ 492 |
« AB |
¬ AC |
AD |
® AE |
Ү 4AE |
B. |
° B0 |
± B1 |
І 406 |
і 456 |
ө 4E9 |
µ B5 |
¶ B6 |
· B7 |
ё 451 |
№ 2116 |
ғ 493 |
» BB |
ә 4D9 |
Ң 4A2 |
ң 4A3 |
ү 4AF |
Кодировка Windows-1251 (чувашский вариант)Править
.0 | .1 | .2 | .3 | .4 | .5 | .6 | .7 | .8 | .9 | .A | .B | .C | .D | .E | .F | |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
8. |
Ђ 402 |
Ѓ 403 |
‚ 201A |
ѓ 453 |
„ 201E |
… 2026 |
† 2020 |
‡ 2021 |
€ 20AC |
‰ 2030 |
Љ 409 |
‹ 2039 |
Ӑ 4D0 |
Ӗ 4D6 |
Ҫ 4AA |
Ӳ 4F2 |
9. |
ђ 452 |
‘ 2018 |
’ 2019 |
“ 201C |
” 201D |
• 2022 |
– 2013 |
— 2014 |
™ 2122 |
љ 459 |
› 203A |
ӑ 4D1 |
ӗ 4D7 |
ҫ 4AB |
ӳ 4F3 |
Татарский вариантПравить
Эта кодировка была официально принята в Татарстане в 1996 г.
.0 | .1 | .2 | .3 | .4 | .5 | .6 | .7 | .8 | .9 | .A | .B | .C | .D | .E | .F | |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
8. |
Ә 4D8 |
Ѓ 403 |
‚ 201A |
ѓ 453 |
„ 201E |
… 2026 |
† 2020 |
‡ 2021 |
€ 20AC |
‰ 2030 |
Ө 4E8 |
‹ 2039 |
Ү 4AE |
Җ 496 |
Ң 4A2 |
Һ 4BA |
9. |
ә 4D9 |
‘ 2018 |
’ 2019 |
“ 201C |
” 201D |
• 2022 |
– 2013 |
— 2014 |
™ 2122 |
ө 4E9 |
› 203A |
ү 4AF |
җ 497 |
ң 4A3 |
һ 4BB |
ПримечанияПравить
- ↑ Historical trends in the usage of character encodings, April 2019
СсылкиПравить
- История создании кодировки в сообщении Игоря Семенюка в эхоконференции SU.LAN от 14 января 1996
- Юникод-коды символов на unicode.org
From Wikipedia, the free encyclopedia
Microsoft was one of the first companies to implement Unicode in their products. Windows NT was the first operating system that used «wide characters» in system calls. Using the (now obsolete) UCS-2 encoding scheme at first, it was upgraded to the variable-width encoding UTF-16 starting with Windows 2000, allowing a representation of additional planes with surrogate pairs. However Microsoft did not support UTF-8 in its API until May 2019.
Before 2019, Microsoft emphasized UTF-16 (i.e. -W API), but has since recommended to use UTF-8 (at least in some cases),[1] on Windows and Xbox (and in other of its products), even states «UTF-8 is the universal code page for internationalization [and] UTF-16 [… is] a unique burden that Windows places on code that targets multiple platforms. [..] Windows [is] moving forward to support UTF-8 to remove this unique burden [resulting] in fewer internationalization issues in apps and games».[2]
A large amount of Microsoft documentation uses the word «Unicode» to refer explicitly to the UTF-16 encoding. Anything else, including UTF-8, is not «Unicode» in Microsoft’s outdated language (while UTF-8 and UTF-16 are both Unicode according to the Unicode Standard, or encodings/»transformation formats» thereof).
In various Windows families
[edit]
Windows NT based systems
[edit]
Current Windows versions and all back to Windows XP and prior Windows NT (3.x, 4.0) are shipped with system libraries that support string encoding of two types: 16-bit «Unicode» (UTF-16 since Windows 2000) and a (sometimes multibyte) encoding called the «code page» (or incorrectly referred to as ANSI code page). 16-bit functions have names suffixed with ‘W’ (from «wide») such as SetWindowTextW
. Code page oriented functions use the suffix ‘A’ for «ANSI» such as SetWindowTextA
(some other conventions were used for APIs that were copied from other systems, such as _wfopen/fopen
or wcslen/strlen
). This split was necessary because many languages, including C, did not provide a clean way to pass both 8-bit and 16-bit strings to the same function.
Microsoft attempted to support Unicode «portably» by providing a «UNICODE» switch to the compiler, that switches unsuffixed «generic» calls from the ‘A’ to the ‘W’ interface and converts all string constants to «wide» UTF-16 versions.[3][4] This does not actually work because it does not translate UTF-8 outside of string constants, resulting in code that attempts to open files just not compiling.[citation needed]
Earlier, and independent of the «UNICODE» switch, Windows also provided the Multibyte Character Sets (MBCS) API switch.[5] This changes some functions that don’t work in MBCS such as strrev
to an MBCS-aware one such as _mbsrev
.[6][7]
In (the now discontinued) Windows CE, UTF-16 was used almost exclusively, with the ‘A’ API mostly missing.[8] A limited set of ANSI API is available in Windows CE 5.0, for use on a reduced set of locales that may be selectively built onto the runtime image.[9]
In 2001, Microsoft released a special supplement to Microsoft’s old Windows 9x systems. It includes a dynamic link library, ‘unicows.dll’, (only 240 KB) containing the 16-bit flavor (the ones with the letter W on the end) of all the basic functions of Windows API. It is merely a translation layer: SetWindowTextW
will simply convert its input using the current codepage and call SetWindowTextA
.
Microsoft Windows (Windows XP and later) has a code page designated for UTF-8, code page 65001[10] or CP_UTF8
. For a long time, it was impossible to set the locale code page to 65001, leaving this code page only available for a) explicit conversion functions such as MultiByteToWideChar and/or b) the Win32 console command chcp 65001
to translate stdin/out between UTF-8 and UTF-16. This meant that «narrow» functions, in particular fopen
(which opens files), couldn’t be called with UTF-8 strings, and in fact there was no way to open all possible files using fopen
no matter what the locale was set to and/or what bytes were put in the string, as none of the available locales could produce all possible UTF-16 characters. This problem also applied to all other APIs that take or return 8-bit strings, including Windows ones such as SetWindowText
.
Programs that wanted to use UTF-8, in particular code intended to be portable to other operating systems, needed a workaround for this deficiency. The usual work-around was to add new functions to open files that convert UTF-8 to UTF-16 using MultiByteToWideChar and call the «wide» function instead of fopen
.[11] Dozens of multi-platform libraries added wrapper functions to do this conversion on Windows (and pass UTF-8 through unchanged on others), an example is a proposed addition to Boost, Boost.Nowide.[12] Another popular work-around was to convert the name to the 8.3 filename equivalent, this is necessary if the fopen
is inside a library. None of these workarounds are considered good, as they require changes to the code that works on non-Windows.
In April 2018 (or possibly November 2017[13]), with insider build 17035 (nominal build 17134) for Windows 10, a «Beta: Use Unicode UTF-8 for worldwide language support» checkbox appeared for setting the locale code page to UTF-8.[a] This allows for calling «narrow» functions, including fopen
and SetWindowTextA
, with UTF-8 strings. However this is a system-wide setting and a program cannot assume it is set.
In May 2019, Microsoft added the ability for a program to set the code page to UTF-8 itself,[1][14] allowing programs written to use UTF-8 to be run by non-expert users.
As of 2019, Microsoft recommends programmers use UTF-8 (e.g. instead of any other 8-bit encoding),[1] on Windows and Xbox, and may be recommending its use instead of UTF-16, even stating «UTF-8 is the universal code page for internationalization [and] UTF-16 [..] is a unique burden that Windows places on code that targets multiple platforms.»[2] Microsoft does appear to be transitioning to UTF-8, stating it previously emphasized its alternative, and in Windows 11 some system files are required to use UTF-8 and do not require a Byte Order Mark.[15] Notepad can now recognize UTF-8 without the Byte Order Mark, and can be told to write UTF-8 without a Byte Order Mark.[citation needed] Some other Microsoft products are using UTF-8 internally, including Visual Studio[16][17] and their SQL Server 2019, with Microsoft claiming 35% speed increase from use of UTF-8, and «nearly 50% reduction in storage requirements.»[18]
String constants in Visual Studio
[edit]
Before 2019 Microsoft’s compilers could not produce UTF-8 string constants from UTF-8 source files. This is due to them converting all strings to the locale code page (which could not be UTF-8). At one time the only method to work around this was to turn off UNICODE, and not mark the input file as being UTF-8 (i.e. do not use a BOM).[19] This would make the compiler think both the input and outputs were in the same single-byte locale, and leave strings unmolested.
- Bush hid the facts, a text encoding mojibake
- ^ Found under control panel, «Region» entry, «Administrative» tab, «Change system locale» button.
- ^ a b c «Use UTF-8 code pages in Windows apps». learn.microsoft.com. Retrieved 2020-06-06.
As of Windows version 1903 (May 2019 update), you can use the ActiveCodePage property in the appxmanifest for packaged apps, or the fusion manifest for unpackaged apps, to force a process to use UTF-8 as the process code page. […]
CP_ACP
equates toCP_UTF8
only if running on Windows version 1903 (May 2019 update) or above and the ActiveCodePage property described above is set to UTF-8. Otherwise, it honors the legacy system code page. We recommend usingCP_UTF8
explicitly. - ^ a b «UTF-8 support in the Microsoft Game Development Kit (GDK) — Microsoft Game Development Kit». learn.microsoft.com. 19 August 2022. Retrieved 2023-03-05.
By operating in UTF-8, you can ensure maximum compatibility [..] Windows operates natively in UTF-16 (or WCHAR), which requires code page conversions by using MultiByteToWideChar and WideCharToMultiByte. This is a unique burden that Windows places on code that targets multiple platforms. [..] The Microsoft Game Development Kit (GDK) and Windows in general are moving forward to support UTF-8 to remove this unique burden of Windows on code targeting or interchanging with multiple platforms and the web. Also, this results in fewer internationalization issues in apps and games and reduces the test matrix that’s required to get it right.
- ^ «Unicode in the Windows API». Retrieved 7 May 2018.
- ^ «Conventions for Function Prototypes (Windows)». MSDN. Retrieved 7 May 2018.
- ^ «Support for Multibyte Character Sets (MBCSs)». Retrieved 2020-06-15.
- ^ «Double-byte Character Sets». MSDN. 2018-05-31. Retrieved 2020-06-15.
our applications use DBCS Windows code pages with the «A» versions of Windows functions.
- ^ _strrev, _wcsrev, _mbsrev, _mbsrev_l Microsoft Docs
- ^ «Differences Between the Windows CE and Windows NT Implementations of TAPI». MSDN. 28 August 2006. Retrieved 7 May 2018.
Windows CE is Unicode-based. You might have to recompile source code that was written for a Windows NT-based application.
- ^ «Code Pages (Windows CE 5.0)». Microsoft Docs. 14 September 2012. Retrieved 7 May 2018.
- ^ «Code Page Identifiers (Windows)». msdn.microsoft.com. 7 January 2021.
- ^ «UTF-8 in Windows». Stack Overflow. Retrieved July 1, 2011.
- ^ «Boost.Nowide». GitHub.
- ^ «Windows10 Insider Preview Build 17035 Supports UTF-8 as ANSI». Hacker News. Retrieved 7 May 2018.
- ^ «Windows 10 1903 and later versions finally support UTF-8 with the A forms of the Win32 functions».
- ^ «Customize the Windows 11 Start menu». docs.microsoft.com. Retrieved 2021-06-29.
Make sure your LayoutModification.json uses UTF-8 encoding.
- ^ «New Options for Managing Character Sets in the Microsoft C/C++ Compiler». devblogs.microsoft.com. 22 February 2016.
At some point in the past, the Microsoft compiler was changed to use UTF-8 internally. So, as files are read from disk, they are converted into UTF-8 on the fly.
- ^ «validate-charset (validate for compatible characters)». docs.microsoft.com. Retrieved 2021-07-19.
Visual Studio uses UTF-8 as the internal character encoding during conversion between the source character set and the execution character set.
- ^ «Introducing UTF-8 support for SQL Server». techcommunity.microsoft.com. 2019-07-02. Retrieved 2021-08-24.
For example, changing an existing column data type from NCHAR(10) to CHAR(10) using an UTF-8 enabled collation, translates into nearly 50% reduction in storage requirements. [..] In the ASCII range, when doing intensive read/write I/O on UTF-8, we measured an average 35% performance improvement over UTF-16 using clustered tables with a non-clustered index on the string column, and an average 11% performance improvement over UTF-16 using a heap.
- ^ UTF-8 Everywhere FAQ: How do I write UTF-8 string literal in my C++ code? (note that the u8″text» proposed solution does not work, string is still mangled)
- «Unicode». MSDN. Microsoft. Retrieved November 10, 2016.
В данной статье пойдёт речь о кодировках в Windows. Все в жизни хоть раз использовали и писали консольные приложения как таковые. Нету разницы для какой причины. Будь-то выбивание процесса или же просто написать «Привет!!! Я не могу сделать кодировку нормальной, поэтому я смотрю эту статью!».
Тем, кто ещё не понимает, о чём проблема, то вот Вам:
А тут было написано:
echo Я абракадабра, написанная автором.
Но никто ничего не понял.
В любом случае в Windows до 10 кодировка BAT и других языков, не использует кодировку поддерживающую Ваш язык, поэтому все русские символы будут писаться неправильно.
1. Настройка консоли в батнике
Сразу для тех, кто пишет chcp 1251 лучше написать это:
assoc .bat = .mp4
Первый способ устранения проблемы, это Notepad++. Для этого Вам нужно открыть Ваш батник таким способом:
Не бойтесь, у Вас откроется код Вашего батника, а затем Вам нужно будет сделать следующие действия:
Если Вам ничего не помогло, то преобразуйте в UTF-8 без BOM.
2. Написание консольных программ
Нередко люди пишут консольные программы(потому что на некоторых десктопные писать невозможно), а кодировка частая проблема.
Первый способ непосредственно Notepad++, но а если нужно сначала одну кодировку, а потом другую?
Сразу для использующих chcp 1251 пишите это:
del C:\Program Data
echo Mne pofig
pause
Второй способ это написать десктопную программу, или же использовать Visual Studio. Если же не помогает, то есть первое: изменение кодировки вывода(Пример на C++).
#include <iostream>
#include <windows.h>
int main() {
SetConsoleCP(номер_кодировки);
SetConsoleOutputCP(номер_кодировки);
}
Если же не сработает:
#include <math.h> //Не забываем про библиотеку Math.
char bufRus[256];
char* Rus(const char* text) {
CharToOem(text, bufRus);
return bufRus
}
int main {
cout << "Тут пишите, что угодно!" << endl;
system("pause")
return 0
}
3. Изменение chcp 1251
Если же у Вас батник, то напишите в начало:
chcp 1251 >nul
for /f "delims=" %%A in ("Мой текст") do >nul chcp 866& echo.%%A
Теперь у Нас будет нормальный вывод в консоль. На других языках (С++):
SetConsoleOutputCP(1251)
//А тут добавляете тот цикл, который был в батнике
4. Сделать жизнь мёдом
При использовании данного способа Вы не сможете:
- Разрабатывать приложения на Windows ниже 10
- Спасти мир от данной проблемы
- Думать о других людях
- Разрабатывать десктопные приложения, так как Вам жизнь покажется мёдом
- Сменить Windows на версию ниже 10
- Ну и понимать людей, у которых Windows ниже 10
Установить Windows 10. Там кодировка консоли специально подходит для языка страны, и Вам больше не нужно будет беспокоиться об этой проблеме. Но у Вас появится ещё 6 проблем, и вернуться к предыдущей лицензионной версии Windows Вы не сможете.
Источник статьи
Автор24
— учеба по твоим правилам
Определение 1
Кодирование информации на ПК в среде операционной системы Windows — это представление информационных данных в формате последовательно расположенных битов, находящихся в одном из возможных состояний.
Операционная система Windows производит выборку команд программы и информационных данных, подлежащих обработке, из памяти персонального компьютера. Память представляет собой электронный модуль, состоящий из набора микросхем, которые также имеют в своём составе тысячи микроэлементов. Такие микроэлементы способны находиться лишь в двух устойчивых состояниях, условно говоря, «включено» или «выключено». Эти состояния имеют соответствие с бинарной (двоичной) системой счисления, где один бит может быть или нулём, или единицей. То есть, вся информация, расположенная в компьютерной памяти, является последовательностью битов, находящихся в одном из возможных состояний.
Кодирование текстовой информации
Когда текстовая информация вводится в память компьютера, то текстовые символы (буквенные, цифровые, знаковые) подвергаются кодированию при помощи разных систем кодирования, состоящих из разнообразных кодовых таблиц, которые размещены на определённых страницах стандартов кодировки информации в текстовом формате. В данных таблицах все символы имеют некоторый числовой код в шестнадцатеричной или десятичной системе счисления, то есть таблицы кодировки отображают соответствие начертания символов и численными кодами и предназначаются для кодировки и декодирования информации, представленной в текстовом формате.
Когда пользователь вводит текстовую информацию при посредстве компьютерной клавиатуры, то каждый заносимый символ проходит процедуру кодирования, то есть преобразования в численный код. А когда текстовая информация выводится на какое-либо периферийное устройство, к примеру, экран монитора, принтер или МФУ (многофункциональное устройство), то согласно символьному числовому коду осуществляется формирование его изображения. Назначение символу конкретного числового значения получается в результате совместного решения соответствующих организаций различных государств. На сегодняшний день не существует единообразной универсальной кодовой таблицы, которая бы удовлетворяла национальные алфавиты всех государств. Нынешние кодовые таблицы состоят из международной и национальной частей, то есть они включают в себя символы латинского и национального алфавитов, цифровые обозначения, знаки препинания и арифметических операций, управляющие и математические символы, псевдографику. Международный раздел кодовых таблиц, основанный на стандарте ASCII (American Standard Code for Information Interchange), определяет коды первой половины символов кодовой таблицы и занимает числовое пространство от нуля до 127 (7F в шестнадцатеричной системе). Следует заметить, что числа от нуля до 32 (то есть 20 в шестнадцатеричной системе) отводятся под кодирование функциональных клавиш (F1, F2, F3 и так далее) на клавиатуре компьютера. На рисунке ниже представлена кодовая таблица международной части, базирующаяся на стандарте ASCII, в десятичной системе счисления:
«Кодирование информации на ПК в среде операционной системы Windows» 👇
Рисунок 1. Кодовая таблица. Автор24 — интернет-биржа студенческих работ
И та же таблица, но в шестнадцатеричной системе счисления:
Рисунок 2. Кодовая таблица. Автор24 — интернет-биржа студенческих работ
Национальный раздел кодовых таблиц состоит из кодов национальных алфавитов, который именую также таблицей символьных наборов. На сегодняшний день есть несколько кодовых таблиц, поддерживающих символы русского алфавита (кириллица), используемых разными операционными системами. Это безусловно считается определённым недостатков и иногда может вызывать проблемы, которые сопряжены с процедурами декодирования численных величин символов. В таблице на рисунке ниже показаны наименования кодовых страниц, где имеются кириллические кодировки:
Рисунок 3. Наименования кодовых страниц, где имеются кириллические кодировки. Автор24 — интернет-биржа студенческих работ
Первым компьютерным стандартом, где была кодировка кириллицы, стал стандарт КОИ8-Р. На рисунке ниже изображена национальная часть кодовой таблицы данного стандарта:
Рисунок 4. Кодовая таблица. Автор24 — интернет-биржа студенческих работ
Сегодня для кодирования кириллического алфавита чаще всего используется кодовая таблица, входящая в страницу стандарта СР1251, которая применяется в семействе операционных систем Windows корпорации Microsoft. Данная таблица изображена на рисунке ниже:
Рисунок 5. Кодовая таблица. Автор24 — интернет-биржа студенческих работ
Все представленные кодовые таблицы, в отличие от стандарта Unicode, используют восьми битную систему кодировки одного символа. Стандарт Unicode был разработан в конце двадцатого века и в нём была применена система кодирования одного символа двумя байтами. Использование данного стандарта явилось продолжением проектирования универсального мирового стандарта, который позволяет разрешить проблему совместимости национальных кодовых таблиц символов. При помощи этого стандарта появилась возможность кодирования $2^{16} = 65536$ разных символьных знаков.
Кодирование графической информации
Информация в графическом формате, то есть это рисунки, фотографии, слайды, видео и так далее, может формироваться и подвергаться корректированию при помощи компьютера, но при этом она должна быть соответственно закодирована. Сегодня разработано много прикладных программ, работающих под управлением операционной системы Windows разных модификаций, способных выполнять обработку графических объектов, но все эти приложения базируются на трёх типах компьютерной графики, а именно это:
- Растровый тип графики.
- Векторный графический тип.
- Фрактальный тип графики.
При пристальном рассмотрении графического изображения на экране дисплея компьютера, можно заметить огромное число точек разных цветов, то есть пикселей (от английского pixel, являющего сокращением от picture element, то есть элемент изображения), которые и формируют все вместе видимую графическую картинку.
Отсюда проистекает следующий вывод, что все графические компьютерные изображения кодируются заданным методом и могут быть представлены в формате графического файла. Файл считается главной структурной составляющей организации и хранения информационных данных в памяти компьютера.