<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    Was there any resolution on this topic? I would like to get rid of
    the unnecessary dependency, the code looked fine at a quick check --
    if it is just about utf8 encoding/decoding.<br>
    <br>
    Eventually it can be made a compile time switch with defines for
    both options, keep the code for both cases and be able to easily
    switch from one to another.<br>
    <br>
    Cheers,<br>
    Daniel<br>
    <br>
    <div class="moz-cite-prefix">On 20/12/13 15:45, Peter Dunkley wrote:<br>
    </div>
    <blockquote
cite="mid:CAEqTk6QTtquWtN4g=_J6MHrwT_37EQZ777=w_NTY3ezLSSfVWA@mail.gmail.com"
      type="cite">
      <div dir="ltr">
        <div class="gmail_extra">
          <div class="gmail_quote">On 20 December 2013 14:09, Timo Teras
            <span dir="ltr"><<a moz-do-not-send="true"
                href="mailto:timo.teras@iki.fi" target="_blank">timo.teras@iki.fi</a>></span>
            wrote:<br>
            <blockquote class="gmail_quote" style="margin:0 0 0
              .8ex;border-left:1px #ccc solid;padding-left:1ex">
              <div class="im">On Fri, 20 Dec 2013 13:56:08 +0000<br>
                Peter Dunkley <<a moz-do-not-send="true"
                  href="mailto:peter.dunkley@crocodile-rcs.com">peter.dunkley@crocodile-rcs.com</a>>
                wrote:<br>
                <br>
                > One of the reasons I used libunistring for this
                detection is that for<br>
                > pretty much all of the code fragments I found
                online for doing this<br>
                > in a "simple" way I saw people pointing out flaws
                in those<br>
                > algorithms.  Can you confirm that this code doesn't
                have any of those<br>
                > flaws and is guaranteed to work in all cases (has
                this implementation<br>
                > been stubbed out and tested fully by someone here)?<br>
                <br>
              </div>
              Did you read the document on the URL it refers to? It is
              quite thorough<br>
              explanation of what it does, it's correctness and speed.
              It also<br>
              explains that the motivation for implementing it was
              because all those<br>
              snippets in the internet are seriously flawed.<br>
              <div class="im"><br>
              </div>
            </blockquote>
            <div>I did see the document.  It looks good.  Does you have
              first hand experience of whether that code is valid and
              correct or not?</div>
            <div><br>
            </div>
            <div>I personally tend to trust a release library from GNU
              somewhat more than code on a web-site - however good that
              web-site and documentation looks.</div>
            <div> </div>
            <blockquote class="gmail_quote" style="margin:0 0 0
              .8ex;border-left:1px #ccc solid;padding-left:1ex">
              <div class="im"><span style="color:rgb(34,34,34)"> </span><br>
              </div>
            </blockquote>
            <blockquote class="gmail_quote" style="margin:0 0 0
              .8ex;border-left:1px #ccc solid;padding-left:1ex">
              <div class="im">
                > Does this really improve performance?  Only a tiny,
                tiny, subset of<br>
                > libunistring is used.  As a result it doesn't
                really matter if<br>
                > libunistring in general is slow, just whether or
                not the one function<br>
                > used from libunistring is slow.<br>
                <br>
              </div>
              I'm referring specifically to the function you use. Please
              check the<br>
              URL for performance comparison. While libunistring is not
              benchmarked<br>
              separately, one can see with 0.1 second look at
              libunistring's<br>
              implementation that it will be slower in performance and
              is likely<br>
              something close to iconv()'s implementation.<br>
            </blockquote>
            <div><br>
            </div>
            <div>I don't have any objection to this change as long as
              you are 100% sure that the algorithm from that web-page
              works correctly.  The algorithm looks good, the web-page
              looks good, the documentation looks good, but I'd really
              prefer it if the implementation was explicitly and fully
              tested before the libunistring call is replaced.</div>
            <div><br>
            </div>
            <div>Something as simple as a loop through all possible
              values calling your function, the libunistring function,
              and comparing the results would be perfect.</div>
            <div><br>
            </div>
            <div>Regards,</div>
            <div><br>
            </div>
            <div>Peter</div>
          </div>
          -- <br>
          <div dir="ltr">
            <div><font face="courier new, monospace">Peter Dunkley</font></div>
            <div><font face="courier new, monospace">Technical Director</font></div>
            <div><font face="courier new, monospace">Crocodile RCS Ltd</font></div>
          </div>
        </div>
      </div>
    </blockquote>
    <br>
    <pre class="moz-signature" cols="72">-- 
Daniel-Constantin Mierla - <a class="moz-txt-link-freetext" href="http://www.asipto.com">http://www.asipto.com</a>
<a class="moz-txt-link-freetext" href="http://twitter.com/#!/miconda">http://twitter.com/#!/miconda</a> - <a class="moz-txt-link-freetext" href="http://www.linkedin.com/in/miconda">http://www.linkedin.com/in/miconda</a></pre>
  </body>
</html>