about summary refs log tree commit diff
path: root/src/rustllvm/RustWrapper.cpp
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2014-02-07 00:56:31 -0800
committerbors <bors@rust-lang.org>2014-02-07 00:56:31 -0800
commit36f1b38f8067503ef3936f9cb2b3b07012e681a6 (patch)
treeece5c265ae8d2e9dc76a2a437a7390895117af6a /src/rustllvm/RustWrapper.cpp
parent21b856d2dc6ae2e4b40c73958d34501358707b39 (diff)
parent544cb42d7aeaec230e10471820f48e561e3cd33d (diff)
downloadrust-36f1b38f8067503ef3936f9cb2b3b07012e681a6.tar.gz
rust-36f1b38f8067503ef3936f9cb2b3b07012e681a6.zip
auto merge of #12062 : kballard/rust/from_utf8_lossy, r=huonw
`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

Closes #9516.
Diffstat (limited to 'src/rustllvm/RustWrapper.cpp')
0 files changed, 0 insertions, 0 deletions