Popularity of text encodings

Short description: none

A number of text encoding standards are used on the World Wide Web. Exact measurements for the prevalence of each are not possible. Attempts at measuring encoding popularity may utilize counts of numbers of documents, or counts weighed by actual use or visibility of those documents.

The decision to use any one encoding may depend on the language used for the documents, or the locale that is the source of the document, or the purpose of the document. Text may be ambiguous as to what encoding it is in, for instance pure ASCII text is valid ASCII or ISO-8859-1 or CP1252 or UTF-8. "Tags" may indicate a document encoding, but when this is incorrect this may be silently corrected by display software (for instance the HTML spec says that the tag for ISO-8859-1 should be treated as CP1252), so counts of tags may not be accurate.

## Contents

* 1 Popularity on the World Wide Web
* 2 Popularity for local text files
* 3 Popularity internally in software
* 4 References

## Popularity on the World Wide Web

Use of the main encodings on the web from 2001 to 2012 as recorded by Google,[1] with UTF-8 overtaking all others in 2008 and over 60% of the web in 2012 (since then approaching 100%). The ASCII-only figure includes all web pages that only contain ASCII characters, regardless of the declared header. Declared character set for the 10 million most popular websites since 2010

UTF-8 has been the most common encoding for the World Wide Web since 2008.[2] As of January 2024[update], UTF-8 is used by 98.1% of surveyed web sites (and 99.1% of top 10,000 pages and 98.2% of the top 1,000 highest ranked web pages), the next most popular encoding, ISO-8859-1, is used by 13 (and only 15 of top 1000).[3] Although many pages only use ASCII characters to display content, very few websites now declare their encoding to only be ASCII instead of UTF-8.[4]

Virtually all countries and over 97% all of the tracked languages have 95% or more use of UTF-8 encodings on the web. See below for the major alternative encodings:

The second-most popular encoding varies depending on locale, and is typically more efficient for the associated language. One such encoding is the Chinese GB 18030 standard, which is a full Unicode Transformation Format, still 95.3% of websites in China and territories use UTF-8[5][6][7] with it (effectively[8]) the next popular encoding. Big5 is another popular Chinese (for traditional characters) encoding and is next-most popular in Taiwan after UTF-8 at 96.5%, and it's also second-most used in Hong Kong, while there as elsewhere, UTF-8 is even more dominant.[9] The single-byte Windows-1251 is twice as efficient for the Cyrillic script and still 94.6% of Russian websites use UTF-8[10] (however e.g. Greek and Hebrew encodings are also twice as efficient, and UTF-8 has over 99% use for those languages).[11][12] Japanese and Korean language websites also have relatively high non-UTF-8 use compared to most other countries, with Japanese UTF-8 use at 94.7% followed by the legacy Shift JIS (actually decoded as its superset Windows-31J encoding) and then EUC-JP encoding.[13][14] South Korea has 95.2% UTF-8 use, with the rest of websites mainly using EUC-KR which is more efficient for Korean text.

With the exception of GB 18030 (and UTF-16 and UTF-8), other (legacy) encodings do not support all Unicode characters, since they were designed for specific languages.

As of January 2024[update], Limburgan (Limburgish) has the lowest UTF-8 use on the web of any tracked language, with 82% use.[15] Well over a third of the languages tracked have 100.0% use of UTF-8 on the web, such as Vietnamese, Marathi, Telugu, Tamil, Javanese, Pañjābī/Punjabi, Gujarati, Farsi/Persian, Hausa, Pashto, Kannada, Lao, Kurdish languages, Tagalog, Somali, Khmer/Cambodian, isiZulu/Zulu, Turkmen, Tajik (has 4 different scripts), and a lot of the languages with the fewest speakers (often with their own scripts) such as, Armenian, Mongolian (which has a top-to-bottom script[16]), Maldivian (Thaana), Greenlandic (Kalaallisut) and also sign languages.[17]

## Popularity for local text files

Local storage on computers has considerably more use of "legacy" single-byte encodings than on the web. Attempts to update to UTF-8 have been blocked by editors that do not display or write UTF-8 unless the first character in a file is a byte order mark, making it impossible for other software to use UTF-8 without being rewritten to ignore the byte order mark on input and add it on output. UTF-16 files are also fairly common on Windows, but not in other systems.[18][19]

## Popularity internally in software

In the memory of a computer program, usage of UTF-16 is very common, particularly in Windows but and also in JavaScript, Qt, and many other cross-platform software libraries. Compatibility with the Windows API is a major reason for this.

At one time it was believed by many (and is still believed today by some) that having fixed-size code units offers computational advantages, which led many systems, in particular Windows, to use the fixed-size UCS-2 with two bytes per character. This is false: strings are almost never randomly accessed, and sequential access is the same speed. In addition, even UCS-2 was not "fixed size" if combining characters are considered, and when Unicode exceeded 65536 code points it had to be replaced with the non-fixed-sized UTF-16 anyway.

Recently it has become clear that the overhead of translating from/to UTF-8 on input and output, and dealing with potential encoding errors in the input UTF-8, vastly overwhelms any savings UTF-16 could offer. So newer software systems are starting to use UTF-8. International Components for Unicode (ICU) has historically only used UTF-16, and still does only for Java, while it now supports UTF-8 (for C/C++ and other languages indirectly), e.g. used that way by Microsoft; supported as the "Default Charset"[20] including the correct handling of "illegal UTF-8".[21] The default string primitive used in newer programing languages, such as Go,[22] Julia, Rust and Swift 5,[23] assume UTF-8 encoding. PyPy is also using UTF-8 for its strings,[24] and Python is looking into storing all strings with UTF-8.[25] Microsoft now recommends the use of UTF-8 for applications using the Windows API, while continuing to maintain a legacy "Unicode" (meaning UTF-16) interface.[26]

## References

1. ↑ "Unicode over 60 percent of the web". Official Google Blog. 2012-02-03. https://googleblog.blogspot.com/2012/02/unicode-over-60-percent-of-web.html.
2. ↑ "Moving to Unicode 5.1" (in en). 2008-05-05. https://googleblog.blogspot.com/2008/05/moving-to-unicode-51.html.
3. ↑ "Usage Survey of Character Encodings broken down by Ranking" (in en). https://w3techs.com/technologies/cross/character_encoding/ranking.
4. ↑ "Usage statistics and market share of ASCII for websites, January 2024". https://w3techs.com/technologies/details/en-usascii.
5. ↑ "Distribution of Character Encodings among websites that use China and territories". https://w3techs.com/technologies/segmentation/sl-cnter-/character_encoding.
6. ↑ "Distribution of Character Encodings among websites that use .cn". https://w3techs.com/technologies/segmentation/tld-cn-/character_encoding.
7. ↑ "Distribution of Character Encodings among websites that use Chinese". https://w3techs.com/technologies/segmentation/cl-zh-/character_encoding.
8. ↑ The Chinese standard GB 2312 and with its extension GBK (which are both interpreted by web browsers as GB 18030, having support for the same letters as UTF-8)
9. ↑ "Distribution of Character Encodings among websites that use Taiwan". https://w3techs.com/technologies/segmentation/sl-tw-/character_encoding.
10. ↑ "Distribution of Character Encodings among websites that use .ru". https://w3techs.com/technologies/segmentation/tld-ru-/character_encoding.
11. ↑ "Distribution of Character Encodings among websites that use Greek". https://w3techs.com/technologies/segmentation/cl-el-/character_encoding.
12. ↑ "Distribution of Character Encodings among websites that use Hebrew". https://w3techs.com/technologies/segmentation/cl-he-/character_encoding.
13. ↑ "Historical trends in the usage of character encodings". https://w3techs.com/technologies/history_overview/character_encoding.
14. ↑ "UTF-8 Usage Statistics". BuiltWith. https://trends.builtwith.com/encoding/UTF-8.
15. ↑ "Usage Report of UTF-8 broken down by Content Languages". https://w3techs.com/technologies/breakdown/en-utf8/content_language.
16. ↑ "ХҮМҮҮН БИЧИГ" (in Mongolian). Montsame News Agency. http://khumuunbichig.montsame.mn/index.php.
17. ↑ "Distribution of Character Encodings among websites that use Sign Languages" (in en). https://w3techs.com/technologies/segmentation/cl-sgn-/character_encoding.
18. ↑ "Charset" (in en). https://developer.android.com/reference/java/nio/charset/Charset. "Android note: The Android platform default is always UTF-8."
19. ↑ Galloway, Matt (9 October 2012). "Character encoding for iOS developers. Or UTF-8 what now?" (in en). http://www.galloway.me.uk/2012/10/character-encoding-for-ios-developers-utf8/. "in reality, you usually just assume UTF-8 since that is by far the most common encoding."
20. ↑ "UTF-8 - ICU User Guide". http://userguide.icu-project.org/strings/utf-8.
21. ↑ "#13311 (change illegal-UTF-8 handling to Unicode "best practice")". http://bugs.icu-project.org/trac/ticket/13311.
22. ↑ "The Go Programming Language Specification". https://golang.org/ref/spec#Source_code_representation.
23. ↑ Tsai, Michael J.. "Michael Tsai - Blog - UTF-8 String in Swift 5" (in en). https://mjtsai.com/blog/2019/03/21/utf-8-string-in-swift-5/.
24. ↑ Mattip (2019-03-24). "PyPy Status Blog: PyPy v7.1 released; now uses utf-8 internally for unicode strings". https://morepypy.blogspot.com/2019/03/pypy-v71-released-now-uses-utf-8.html.
25. ↑ "PEP 623 -- Remove wstr from Unicode" (in en). https://www.python.org/dev/peps/pep-0623/. "Until we drop legacy Unicode object, it is very hard to try other Unicode implementation like UTF-8 based implementation in PyPy."
26. ↑ "Use the Windows UTF-8 code page" (in en-us). UWP applications. docs.microsoft.com. https://docs.microsoft.com/en-us/windows/uwp/design/globalizing/use-utf8-code-page.

0.00

(0 votes)

Original source: https://en.wikipedia.org/wiki/Popularity of text encodings. Read more

|

Retrieved from "https://handwiki.org/wiki/index.php?title=Popularity_of_text_encodings&oldid=329899"