Microsoft's compilers oftencould fail atnot producingproduce UTF-8 string constants from UTF-8 source files. TheThis mostis reliable method isdue to turnthem ''off''converting UNICODE, ''not'' mark theall input filetext asfrom beingthe UTF-8"locale" (i.e.which docould not usebe a [[UTF-8#Byte) orderto mark|BOM]])16-bit UTF-16, andwhich arrangeturned theevery stringbyte constantsof to have thea UTF-8 bytes.string Ifinto a BOMcharacter. wasAt added,one atime Microsoftthe compileronly willmethod interpretto thework stringsaround asthis UTF-8,was convertto themturn to''off'' UTF-16{{tt|UNICODE}}, then convert themand ''backnot'' intomark the currentinput locale,file thusas destroyingbeing theUTF-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>{{Obsoletesource|reason=This sourcewould seemsmake morethe thancompiler 10think yearsboth old.the (Citinginput Unicodeand 6.2).outputs Canwere thisin contentsthe be verified?|date=July 2024}} Without a BOM and using asame single-byte locale, Microsoft compilers willand leave the bytes in a quoted stringstrings unchangedunmolested. On modern systems setting the code page to UTF-8 helps considerably, but invalid byte sequencesthere are still notproblems preserved (using {{code|\x}} canto workget aroundindividual this)bytes into the UTF-8.{{Citation needed|date=July 2024|reason=Not sure if this is true}}