<br><br><div class="gmail_quote">On Tue, May 15, 2012 at 7:51 PM, Christophe <span dir="ltr"><<a href="mailto:travert@phare.normalesup.org" target="_blank">travert@phare.normalesup.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
using printf will lead to a bug each time the programmer forget the trailing<br>
\0.</blockquote><div><br></div><div>First of all, printf shouldn't be used! There's writef and it's superior to printf in any way!</div><div>Second of all, if the zero-termination of literals are to be removed, the literals will no longer be accepted as a pointer to a character.</div>
<div>The appropriate type mismatch error will force the user to use toUTF8z to get ht e zero-terminated utf-8 version of the original string.</div><div>In case it's a literal, one could use the compile-time version of toUTF8z to avoid run-time overhead.</div>
<div>This all doesn't sound like a bad idea to me. I don't see any security or performance flaws in this scheme.</div><div> </div></div>-- <br>Bye,<br>Gor Gyolchanyan.<br>