Unicode in Microsoft Windows: Difference between revisions

Content deleted Content added
Programming platforms: Remove "obsolete source" since that is obvious due to the "at one time" at start of sentence
AnomieBOT (talk | contribs)
m Dating maintenance tags: {{Cn}}
Line 35:
 
=== Compilers ===
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'' {{tt|UNICODE}}, and ''not'' mark the input file as being UTF-8 (i.e. do not use a [[UTF-8#Byte order mark|BOM]]).<ref>[http://utf8everywhere.org/#faq.literal UTF-8 Everywhere FAQ: How do I write UTF-8 string literal in my C++ code?]</ref> This would make the compiler think both the input and outputs were in the same single-byte locale, and leave strings unmolested. On modern systems setting the code page to UTF-8 helps.{{cn|reason=Probably true this fixes it, but need confirmation|date=September 2024}}
 
== See also ==