Unicode in Microsoft Windows: Difference between revisions

Content deleted Content added
Compilers: Remove text that replicates introduction sentence and is fairly obvious anyway, and the "work around" would work anyways.
Line 35:
 
=== String constants ===
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?] (note that the {{tt|u8"text"}} proposed solution does not work, string is still mangled)</ref> This would make the compiler think both the input and outputs were in the same single-byte locale, and leave strings unmolested.
 
== See also ==