<div dir="auto">Thanks for the comments!<div dir="auto">Not validating codepoints was deliberate but in hindsight arbitrary, I'll fix that. (Both surrogates and high codepoints).</div><div dir="auto"><br></div><div dir="auto">Regarding a separate library: I agree in principle :-) but am concerned about the potential scope/generality and don't have cycles to design it right now, even extracting JSON is a bit of a yak-shave...</div><div dir="auto">Here it's in support and exposed as free functions, so if it really is useful, it *is* available and we can move it later.</div><div dir="auto">That's the best argument I can come up with, open to better ideas :)</div></div><br><div class="gmail_quote"><div dir="ltr">On Mon, Apr 30, 2018, 19:51 Ben Hamilton via Phabricator <<a href="mailto:reviews@reviews.llvm.org">reviews@reviews.llvm.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">benhamilton added a comment.<br>
<br>
Also, IMHO, this logic should be in a separate UTF-8 library so we can use it outside of JSON contexts.<br>
<br>
<br>
Repository:<br>
  rL LLVM<br>
<br>
<a href="https://reviews.llvm.org/D46274" rel="noreferrer noreferrer" target="_blank">https://reviews.llvm.org/D46274</a><br>
<br>
<br>
<br>
</blockquote></div>