<div dir="ltr"><div>Hey. </div><div><br></div><div dir="ltr">Agreed, it's a byte thing - actually, have you considered std::byte ?</div><div>You showed that it is trivial to programmatically add a null terminator, which seems sufficient to cover all use cases</div><div><br></div><div><br></div><div>BUT</div><div>We need a (completely orthogonal) feature which should have no bearing on your paper: std::trust_me_these_bytes_are_utf8 <br></div><div><br></div><div><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, 6 Nov 2019 at 13:12, JeanHeyd Meneide <<a href="mailto:phdofthehouse@gmail.com">phdofthehouse@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><div><div>Dear SG16,<br><br></div> I presented #embed_str to EWG. They said I need to take a trip through SG16.<br><br></div> The semantics of #embed_str are that the contents of the file are loaded up as individual entries in a regular string literal. For example, if the contents of a file were<br><br></div>foo<br><div><br></div><div>Then the array that backs the string literal would be loaded as<br><br></div><div>[f | o | o | \0]<br>[0 | 1 | 2 | 3]<br></div><div><br></div><div> A better name for it might be #embed_null_terminated`. I don't think this has much to do with Unicode at the end of the day, because it deals with code units. There would be no embed_u8str or embed_u16str or embed_u32str, because there's no guarantee the contents of the file would be valid UTFX and I am not about to get into the mess that is "source resource encoding" and "compile-time resource encoding" conversions.<br><br></div><div> If #embed_str is too suggestive of text, I will be more than happy to put an axe through it. Do let me know how to proceed.<br><br></div><div>Sincerely,<br></div><div>JeanHeyd Meneide<br></div></div>
_______________________________________________<br>
SG16 Unicode mailing list<br>
<a href="mailto:Unicode@isocpp.open-std.org" target="_blank">Unicode@isocpp.open-std.org</a><br>
<a href="http://www.open-std.org/mailman/listinfo/unicode" rel="noreferrer" target="_blank">http://www.open-std.org/mailman/listinfo/unicode</a><br>
</blockquote></div></div>