<div dir="ltr"><div dir="ltr"><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Apr 27, 2021 at 7:20 PM Tom Honermann &lt;<a href="mailto:tom@honermann.net">tom@honermann.net</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">
  
    
  
  <div>
    <div>On 4/27/21 12:27 PM, Corentin Jabot
      wrote:<br>
    </div>
    <blockquote type="cite">
      
      <div dir="ltr">
        <div dir="ltr"><br>
        </div>
        <div class="gmail_quote">
          <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 class="gmail_quote">
                <blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
                  <div>
                    <blockquote type="cite">
                      <div dir="ltr">
                        <div class="gmail_quote"> </div>
                      </div>
                    </blockquote>
                    <p>I think we&#39;ve been focusing on different things
                      here.  The issue I&#39;m trying to discuss is
                      independent of use of the
                      write-directly-to-the-console method.  This
                      discussion is about having <tt>std::print()</tt>
                      (and <tt>std::format()</tt>) internally ensure
                      that that format arguments provided by the locale
                      are transcoded to match the encoding of the format
                      string.  This happens before anything is written
                      to the console; this is the step where the
                      formatting is done and the intent is to ensure
                      that well-formed text is produced *before* it is
                      transcoded to the native console encoding (whether
                      that be UTF-8, UTF-16, whatever).  Transcoding
                      requires well-formed input of course.</p>
                    <p>Does this help to get us on the same page</p>
                  </div>
                </blockquote>
              </div>
            </div>
          </blockquote>
          <div><br>
          </div>
          <div>I actually disagree with that.</div>
          <div>I don&#39;t think there is intent in the current design that
            the output has to be text at all. I could use format to
            create some kind of binary format if i wanted to, except the
            _formatting_ string is text because it needs to be parsed,</div>
          <div>So format as specified doesn&#39;t put requirements on  the
            arguments beyond the formatting string and doesn&#39;t need to.</div>
          <div>What makes print text is that it outputs to the console,
            at which point text is assumed.</div>
          <div>The transcoding  happens after formating, and might as
            well not</div>
          <div><br>
          </div>
          <div>forrmat(a, b, c) -&gt; result</div>
          <div>printUtf8ToConsole(result);</div>
          <div><br>
          </div>
          <div>The fact that printUtf8 is implemented as
            printUTF16(toUTF16(result)) is an implementation detail that
            should not be observable nor described by the C++ standard.</div>
          <div><br>
          </div>
          <div>And I don&#39;t think print should do _anything_ to check for
            some amount of validity before  printing out something.</div>
          <div><br>
          </div>
        </div>
      </div>
    </blockquote>
    <p>I don&#39;t disagree with what you wrote above, but it is not
      relevant to this discussion.  I don&#39;t know why we&#39;re having such a
      hard time communicating here.  Please, carefully re-read some of
      my prior responses with the understanding that how you have
      understood them so far does not match what I intended.  If you
      then have clarifying questions, please feel free to ask them.<br></p></div></blockquote><div><br></div><div>Okay, so your point is that implementations should do something magical for things that are formatted through a locale facet on the basis the encoding of the result of time_put is known?</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div><p>
    </p>
    <p>Tom.<br>
    </p>
  </div>

</blockquote></div></div>

