diff options
| author | Kevin Ballard <kevin@sb.org> | 2014-02-05 23:56:27 -0800 |
|---|---|---|
| committer | Kevin Ballard <kevin@sb.org> | 2014-02-06 23:44:26 -0800 |
| commit | b0b89a57d5d548155d8a37f5e4b9f11a471bb075 (patch) | |
| tree | a7bdfd1e6990756d80ca79da11ae6bc07db89299 /src/rustllvm/RustWrapper.cpp | |
| parent | 6aad3bf944da209d1852c51144ba584de400a10c (diff) | |
| download | rust-b0b89a57d5d548155d8a37f5e4b9f11a471bb075.tar.gz rust-b0b89a57d5d548155d8a37f5e4b9f11a471bb075.zip | |
Add new function str::from_utf8_lossy()
from_utf8_lossy() takes a byte vector and produces a ~str, converting any invalid UTF-8 sequence into the U+FFFD REPLACEMENT CHARACTER. The replacement follows the guidelines in ยง5.22 Best Practice for U+FFFD Substitution from the Unicode Standard (Version 6.2)[1], which also matches the WHATWG rules for utf-8 decoding[2]. [1]: http://www.unicode.org/versions/Unicode6.2.0/ch05.pdf [2]: http://encoding.spec.whatwg.org/#utf-8
Diffstat (limited to 'src/rustllvm/RustWrapper.cpp')
0 files changed, 0 insertions, 0 deletions
