Unicode in Microsoft Windows: Difference between revisions

Content deleted Content added
Undid revision 1046468234 by 2A01:119F:253:7000:4C4F:5091:E8EB:EB59 (talk) restore correct explanation of why it fails
A Unix supremacist biased source is by no means useful to any reader.
Tags: Reverted references removed
Line 33:
 
=== Programming platforms ===
Microsoft's compilers often fail at producing UTF-8 string constants from UTF-8 source files. The most reliable method is to turn ''off'' UNICODE, ''not'' mark the input file as being UTF-8 (i.e. do not use a [[UTF-8#Byte order mark|BOM]]), and arrange the string constants to have the UTF-8 bytes. If a BOM was added, a Microsoft compiler will interpret the strings as UTF-8, convert them to UTF-16, then convert them ''back'' into the current locale, thus destroying the UTF-8.<ref>[http://utf8everywhere.org/#faq.literal, UTF-8which Everywhereis FAQ:the Howcorrect dobehaviour, Ias writethe UTF-8<code>char</code> string literaltype in my[[C (programming language)]] and [[C++ code?]</ref>] is only used to store 8-bit characters. Without a BOM and using a single-byte locale, Microsoft compilers will leave the bytes in a quoted string unchanged.
 
== See also ==