<div dir="ltr"><div dir="ltr"><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Aug 14, 2019 at 8:54 PM Ed Catmur via Liaison &lt;<a href="mailto:liaison@lists.isocpp.org">liaison@lists.isocpp.org</a>&gt; wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><br>
<br><br>
Note that the compiler already necessarily knows the source file encoding <br>
and the execution encoding, to be able to perform the various [lex.phases]. <br>
Would it be enough or at least help to expose those, or at least the latter?<br>
<br><br></blockquote><div>The compiler makes assumptions about the source file encoding and execution encoding. From a standard perspective, it depends on locale, in some unspecified way. That is, the values of characters in the &quot;execution character set&quot; depend on locale. Execution encoding isn&#39;t actually a term in the standard, although it&#39;s implied. <br><br>If the compiler assumes a single byte encoding like Latin-1 it can&#39;t tell that the intended encoding is UTF-8. This happens all the time, and sometimes actually appears to work when the string literals are eventually interpreted as UTF-8 instead of Latin-1. Other times, mojibake happens. <br><br><br></div></div></div>