Commit Graph

1 Commits

Author SHA1 Message Date
Maxim Moiseev
38f7ec2a32 [stdlib] Fix the String.decodeCString for UTF16 and UTF32 (#2681)
[stdlib] Fix the `String.decodeCString` for UTF16 and UTF32

Resolves [SR-1578](https://bugs.swift.org/browse/SR-1578]
Essentially the problem was that `strlen` is not the right way of
obtaining a length of anything but null-terminated UTF-8 sequence of
characters. Other encodings require alternative mechanisms.
2016-05-25 15:51:10 -07:00