diff options
Diffstat (limited to 'Swiften/IDN/IDNA.cpp')
-rw-r--r-- | Swiften/IDN/IDNA.cpp | 28 |
1 files changed, 0 insertions, 28 deletions
diff --git a/Swiften/IDN/IDNA.cpp b/Swiften/IDN/IDNA.cpp deleted file mode 100644 index 16b4183..0000000 --- a/Swiften/IDN/IDNA.cpp +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Copyright (c) 2010 Remko Tronçon - * Licensed under the GNU General Public License v3. - * See Documentation/Licenses/GPLv3.txt for more information. - */ - -#include <Swiften/IDN/IDNA.h> - -#include <stringprep.h> -#include <vector> -#include <cstdlib> -#include <idna.h> - -namespace Swift { - -std::string IDNA::getEncoded(const std::string& domain) { - char* output; - if (idna_to_ascii_8z(domain.c_str(), &output, 0) == IDNA_SUCCESS) { - std::string result(output); - free(output); - return result; - } - else { - return domain; - } -} - -} |