Punycode encoder/decoder: separate core and parts that depend on UTF8

encoder/decoder


Swift SVN r20307
This commit is contained in:
Dmitri Hrybenko
2014-07-22 14:37:37 +00:00
parent 87ed6c8a5b
commit 56342b0cfa
7 changed files with 117 additions and 81 deletions

View File

@@ -718,7 +718,7 @@ private:
auto decode = [&](StringRef s) -> StringRef {
if (!isPunycoded)
return s;
if (Punycode::decodePunycode(s, decodeBuffer))
if (!Punycode::decodePunycodeUTF8(s, decodeBuffer))
return {};
return decodeBuffer;
};