Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Text file
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
===Microsoft Windows text files=== <!-- This Anchor tag serves to provide a permanent target for incoming section links. Please do not remove it, nor modify it, except to add another appropriate anchor. If you modify the section title, please anchor the old title. It is always best to anchor an old section header that has been changed so that links to it won't be broken. See [[Template:Anchor]] for details. This template is {{subst:Anchor comment}} --> DOS and [[Microsoft Windows]] use a common text file format, with each line of text separated by a two-character combination: [[carriage return]] (CR) and [[line feed]] (LF). It is common for the last line of text ''not'' to be terminated with a CR-LF marker, and many text editors (including [[Notepad (Windows)|Notepad]]) do not automatically insert one on the last line. On Microsoft Windows operating systems, a file is regarded as a text file if the suffix of the name of the file (the "[[filename extension]]") is <code>.txt</code>. However, many other suffixes are used for text files with specific purposes. For example, source code for computer programs is usually kept in text files that have file name suffixes indicating the [[programming language]] in which the source is written. Most Microsoft Windows text files use ANSI, OEM, Unicode or UTF-8 encoding. What Microsoft Windows terminology calls "ANSI encodings" are usually single-byte [[ISO/IEC 8859]] encodings (i.e. ANSI in the Microsoft Notepad menus is really "System Code Page", non-Unicode, legacy encoding), except for in locales such as Chinese, Japanese and Korean that require double-byte character sets. ANSI encodings were traditionally used as default system locales within Microsoft Windows, before the transition to Unicode. By contrast, OEM encodings, also known as [[DOS code page]]s, were defined by [[IBM]] for use in the original [[IBM PC]] text mode display system. They typically include graphical and [[Box-drawing character|line-drawing characters]] common in DOS applications. "Unicode"-encoded Microsoft Windows text files contain text in [[UTF-16]] Unicode Transformation Format. Such files normally begin with [[byte order mark]] (BOM), which communicates the endianness of the file content. Although UTF-8 does not suffer from endianness problems, many Microsoft Windows programs (i.e. Notepad) prepend the contents of UTF-8-encoded files with BOM,<ref>{{cite web |date=Jan 7, 2021 |title=Using Byte Order Marks |url=https://docs.microsoft.com/en-gb/windows/win32/intl/using-byte-order-marks |url-status=live |archive-url=https://web.archive.org/web/20230221224807/https://learn.microsoft.com/en-gb/windows/win32/intl/using-byte-order-marks |archive-date=Feb 21, 2023 |access-date=2022-04-21 |work=Internationalization for Windows Applications |publisher=[[Microsoft]]}}</ref> to differentiate UTF-8 encoding from other 8-bit encodings.<ref>{{cite web |url=https://www.unicode.org/faq/utf_bom.html#BOM |title=FAQ β UTF-8, UTF-16, UTF-32 & BOM |first=Asmus |last=Freytag |publisher=The Unicode Consortium |date=2015-12-18 |access-date=2016-05-30 |quote=Yes, UTF-8 can contain a BOM. However, it makes ''no'' difference as to the endianness of the byte stream. UTF-8 always has the same byte order. An initial BOM is only used as a signature β an indication that an otherwise unmarked text file is in UTF-8. Note that some recipients of UTF-8 encoded data do not expect a BOM. Where UTF-8 is used ''transparently'' in 8-bit environments, the use of a BOM will interfere with any protocol or file format that expects specific ASCII characters at the beginning, such as the use of "#!" of at the beginning of Unix shell scripts.}}</ref>
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)