[Mono-dev] [Dotnet-runtime-dev] ASCII Strings Proposal
Miguel de Icaza
miguel.de.icaza at gmail.com
Thu Jul 28 14:08:46 UTC 2016
> > > For historical reasons, System.String uses the UCS-2 character
> > that is, UTF-16 without surrogate pairs.
> > > However, most strings in typical .NET applications consist solely of
> > characters, leading to wasted space: half of the bytes in a string are
> likely to
> > be null bytes!
> What's wrong with UTF-8?
Nothing is wrong, but in .NET we surface a string indexer, and it has
constant time properties.
UTF-8 needs to be parsed to be indexed, while neither ascii, nor the
UTF-16/surrogate-pair encoding (what .NET uses) has this.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Mono-devel-list