<div dir="auto">That's what I'm thinking. Raw data to scalar values for decode, vice versa for encode, and connect them for transcode, or attempted transcode. <div dir="auto"><br></div><div dir="auto">Maybe include some queries for if the mapping is known to be a pure transcoding. </div><div dir="auto"><br></div><div dir="auto">And with some ability to do fast path shortcuts for some pairs of encodings. </div><div dir="auto"><br></div><div dir="auto">This is the normal implementation, so it shouldn't be controversial. I also want to have hooks or capability for transliteration, which is really just more interesting error handling on the "to" side of charset mapping. </div><div dir="auto"><br></div><div dir="auto">Because this may be runtime determined, it probably means virtual functions and a base interface, but I think particular encodings can be types, with final functions, so if you are deterministic the compiler will devirtualize. </div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sat, Mar 30, 2019, 18:29 Lyberta <<a href="mailto:lyberta@lyberta.net" rel="noreferrer noreferrer noreferrer noreferrer" target="_blank">lyberta@lyberta.net</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Steve Downey:<br>
> I would like to standardise the encoding and decoding interfaces<br>
What about transcoding? Do we want to require all encodings be<br>
convertible to Unicode scalar values so we can have a universal<br>
transcoding algorithm that will use scalar values under the hood?<br>
<br>
_______________________________________________<br>
SG16 Unicode mailing list<br>
<a href="mailto:Unicode@isocpp.open-std.org" rel="noreferrer noreferrer noreferrer noreferrer noreferrer" target="_blank">Unicode@isocpp.open-std.org</a><br>
<a href="http://www.open-std.org/mailman/listinfo/unicode" rel="noreferrer noreferrer noreferrer noreferrer noreferrer noreferrer" target="_blank">http://www.open-std.org/mailman/listinfo/unicode</a><br>
</blockquote></div>