I was referring to UCS-2 or UCS-4. I’m evidently behind the times, though, because I now see that UTF-32 and UCS-4 are equivalent.
(Which means that both some of John’s original premises and my quote in teal below were wrong: UTF32 is indeed a one:one map between code points and chars.) So my proposal (in 2019) should be std::u32string (using UTF32 encoding, for which myString[3] still works). Better? Cheers, Jeff. PS: I was last in deep with this stuff during the early days of PDF & Acrobat — which was 30 years ago. ;) > On 30 Apr 2019, at 18:05, Seth Hillbrand <s...@hillbrand.org> wrote: > > Am 2019-04-30 12:49, schrieb Jeff Young: > >> You are correct that you also can’t do it with UTF32 strings, but >> I’m not suggesting those. I’m suggesting *unicode* strings. >> That’s 1 code-point per character. So myString[3] still works. > > Sorry Jeff, I'm being slow here and must be missing an important point. I > had thought that unicode was encoded by UTF-8, UTF-16, etc. But it sounds > like you a referring to something different. Is there a good place to look > for more information on the specific encoding you are suggesting? > > -Seth _______________________________________________ Mailing list: https://launchpad.net/~kicad-developers Post to : kicad-developers@lists.launchpad.net Unsubscribe : https://launchpad.net/~kicad-developers More help : https://help.launchpad.net/ListHelp