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

encoder/decoder


Swift SVN r20309
This commit is contained in:
Dmitri Hrybenko
2014-07-22 15:01:12 +00:00
parent 734c0a9ba1
commit e7b4e6c370
7 changed files with 118 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;
};