<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<div class="moz-cite-prefix">On 8/14/19 2:49 AM, Corentin Jabot via
Core wrote:<br>
</div>
<blockquote type="cite"
cite="mid:CA+Om+SggOo_MsB9uMFnwWFB3YJcs0539bF8iVpnV+iTN_kj+Cg@mail.gmail.com">
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<div dir="auto">
<div><br>
<br>
<div class="gmail_quote">
<div dir="ltr" class="gmail_attr">On Wed, Aug 14, 2019, 4:46
AM Tony V E <<a href="mailto:tvaneerd@gmail.com"
moz-do-not-send="true">tvaneerd@gmail.com</a>> wrote:<br>
</div>
<blockquote class="gmail_quote" style="margin:0 0 0
.8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr">
<div dir="ltr"><br>
</div>
<br>
<div class="gmail_quote">
<div dir="ltr" class="gmail_attr">On Tue, Aug 13, 2019
at 8:57 AM Corentin Jabot <<a
href="mailto:corentinjabot@gmail.com"
target="_blank" rel="noreferrer"
moz-do-not-send="true">corentinjabot@gmail.com</a>>
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">
<div dir="ltr">
<div dir="ltr"><br>
</div>
<br>
<div class="gmail_quote">
<div dir="ltr" class="gmail_attr">On Tue, 13 Aug
2019 at 14:52, Ville Voutilainen <<a
href="mailto:ville.voutilainen@gmail.com"
target="_blank" rel="noreferrer"
moz-do-not-send="true">ville.voutilainen@gmail.com</a>>
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">On Tue, 13
Aug 2019 at 15:35, Corentin Jabot via Core<br>
<<a href="mailto:core@lists.isocpp.org"
target="_blank" rel="noreferrer"
moz-do-not-send="true">core@lists.isocpp.org</a>>
wrote:<br>
><br>
><br>
> Chiming in with my favorite solution:>
Forbid u8/u16/u32 literals in non unicode
encoded files<br>
<br>
But presumably not the ones that look like
u8"\U1234" ?<br>
</blockquote>
<div><br>
</div>
<div>Yes, there is no reason to disallow that as
It can't be misinterpreted by neither the
compiler or people (and quite a lot of code
would needlessly break)</div>
<div><br>
</div>
</div>
</div>
</blockquote>
<div><br>
</div>
<div>I find your lack of faith in people's ability to
misinterpret something disturbing.</div>
:-)<br clear="all">
</div>
</div>
</blockquote>
</div>
</div>
<div dir="auto"><br>
</div>
<div dir="auto">😁 (Challenging your mail client)</div>
<div dir="auto"><br>
</div>
<div dir="auto"><br>
</div>
<div dir="auto">\Uxxxx is unambiguous.</div>
<div dir="auto"><br>
</div>
<div dir="auto">u8"é" is ambiguous. Both people and the compiler
may interpret that in a variety of ways. Notably if I have
utf-8 in that file, which I wrote on Linux, but then the msvc
compiler thinks it's windows 1252...</div>
<div dir="auto">Mojibake.</div>
</div>
</blockquote>
There is no ambiguity there, just bog standard mojibake due to
incorrect source file encoding assumptions. <tt>"é"</tt> has
exactly the same set of "problems" as <tt>L"é"</tt>, <tt>u8"é"</tt>,
<tt>u"é"</tt>, and <tt>U"é"</tt>.<br>
<blockquote type="cite"
cite="mid:CA+Om+SggOo_MsB9uMFnwWFB3YJcs0539bF8iVpnV+iTN_kj+Cg@mail.gmail.com">
<div dir="auto">
<div dir="auto"><br>
</div>
<div dir="auto"><br>
</div>
<div dir="auto">People also seem to be confused</div>
<div dir="auto"><br>
</div>
<div dir="auto"><a
href="https://stackoverflow.com/questions/23471935/how-are-u8-literals-supposed-to-work"
moz-do-not-send="true">https://stackoverflow.com/questions/23471935/how-are-u8-literals-supposed-to-work</a></div>
</div>
</blockquote>
<p>Yes, that is a typical example of someone learning that source
file encoding and execution encoding can be independently
controlled. Note that the example even illustrates the individual
being confused about handling of u8 literals and *then* becoming
confused about handling of ordinary literals after learning about
gcc's <tt>-finput-charset</tt> option (but apparently having not
yet learned about gcc's <tt>-fexec-charset</tt> option).<br>
</p>
<p>Tom.<br>
</p>
<blockquote type="cite"
cite="mid:CA+Om+SggOo_MsB9uMFnwWFB3YJcs0539bF8iVpnV+iTN_kj+Cg@mail.gmail.com">
<div dir="auto">
<div dir="auto"><br>
</div>
<div dir="auto">
<div class="gmail_quote">
<blockquote class="gmail_quote" style="margin:0 0 0
.8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr"><br>
-- <br>
<div dir="ltr"
class="m_7879927267910778109gmail_signature">
<div dir="ltr">
<div>Be seeing you,<br>
</div>
Tony<br>
</div>
</div>
</div>
</blockquote>
</div>
</div>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<pre class="moz-quote-pre" wrap="">_______________________________________________
Core mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Core@lists.isocpp.org">Core@lists.isocpp.org</a>
Subscription: <a class="moz-txt-link-freetext" href="https://lists.isocpp.org/mailman/listinfo.cgi/core">https://lists.isocpp.org/mailman/listinfo.cgi/core</a>
Link to this post: <a class="moz-txt-link-freetext" href="http://lists.isocpp.org/core/2019/08/7049.php">http://lists.isocpp.org/core/2019/08/7049.php</a>
</pre>
</blockquote>
<p><br>
</p>
</body>
</html>