stdlib: fix some bugs in UTF-16/UTF-8 transcoder that is hidden inside String

implementation:

- don't crash on NSStrings that contain isolated surrogates (partial fix, there
  is a different code path that dispatches CoreFoundation and it still
  crashes);

- insert U+FFFD according to Unicode recommendation;

- fix decoding of surrogate pairs when the internal buffer is almost full
  (we used to drop characters in that case, rdar://16833733 + dups).


Swift SVN r19147
This commit is contained in:
Dmitri Hrybenko
2014-06-24 21:59:19 +00:00
parent a7b563855e
commit 9bd0b1e8d3
4 changed files with 873 additions and 534 deletions

File diff suppressed because it is too large Load Diff