You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hc.apache.org by Gary Gregory <ga...@gmail.com> on 2019/12/29 20:32:44 UTC
String length
There was a PR flying around about string length and if × 2 was right or
not. But with Unicode the string length might not be the same as the
codePointCount...
so if want want to count what to put on the wire using code points might be
correct.
Gary
Re: String length
Posted by sebb <se...@gmail.com>.
What are you trying to measure?
On Sun, 29 Dec 2019 at 20:33, Gary Gregory <ga...@gmail.com> wrote:
> There was a PR flying around about string length and if × 2 was right or
> not. But with Unicode the string length might not be the same as the
> codePointCount...
> so if want want to count what to put on the wire using code points might be
> correct.
>
> Gary
>
Re: String length
Posted by Ryan Schmitt <rs...@apache.org>.
The spec considers one octet to be one octet in length. It specifies limits
in terms of bytes on the wire, not in terms of characters, code points, or
glyphs.
On Sun, Dec 29, 2019 at 2:28 PM Oleg Kalnichevski <ol...@apache.org> wrote:
> On Sun, 2019-12-29 at 15:32 -0500, Gary Gregory wrote:
> > There was a PR flying around about string length and if × 2 was right
> > or
> > not. But with Unicode the string length might not be the same as the
> > codePointCount...
> > so if want want to count what to put on the wire using code points
> > might be
> > correct.
> >
> > Gary
>
> It got dropped in favor of simpler approach based on assumption that
> HTTP/2 spec considers one char to be one octet in length.
>
> Oleg
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
> For additional commands, e-mail: dev-help@hc.apache.org
>
>
Re: String length
Posted by Oleg Kalnichevski <ol...@apache.org>.
On Sun, 2019-12-29 at 15:32 -0500, Gary Gregory wrote:
> There was a PR flying around about string length and if × 2 was right
> or
> not. But with Unicode the string length might not be the same as the
> codePointCount...
> so if want want to count what to put on the wire using code points
> might be
> correct.
>
> Gary
It got dropped in favor of simpler approach based on assumption that
HTTP/2 spec considers one char to be one octet in length.
Oleg
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org