>
>
> > > For historical reasons, System.String uses the UCS-2 character
> encoding,
> > that is, UTF-16 without surrogate pairs.
> >
> > > However, most strings in typical .NET applications consist solely of
> ASCII
> > 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.

Miguel.
_______________________________________________
Mono-devel-list mailing list
[email protected]
http://lists.dot.net/mailman/listinfo/mono-devel-list

Reply via email to