C++ Logo


Advanced search

Subject: Re: [SG16-Unicode] Comments on D1629R1 Standard Text Encoding
From: Henri Sivonen (hsivonen_at_[hidden])
Date: 2019-08-18 14:47:27

On Sun, Aug 18, 2019, 19:07 Thiago Macieira <thiago_at_[hidden]> wrote:

> On Saturday, 17 August 2019 12:25:57 PDT Henri Sivonen wrote:
> > To the extent other programming languages that have encoding
> > conversion in their standard library, such as Java, focus on
> > contiguous buffers rather than iteration, it's worthwhile to study if
> > application developers really feel that something important is
> > missing.
> We were just discussing URLs in the cpplang Slack and that reminded me:
> there's exactly one in 10 years case that I've needed to decode a non-
> contiguous byte range and that's when parsing a URL.

Can you elaborate on this? Per spec, URL parsing doesn't invoke a decoder
but an encoder:

Here's the corresponding code in Firefox using the span-oriented API that I
linked to in my previous email:
The span-oriented API works well here in my opinion, even though this case
is a more advanced used of the API that implement a custom replacement


SG16 list run by sg16-owner@lists.isocpp.org