chromium/third_party/blink/renderer/core/loader/idna_util.cc

// Copyright 2022 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "third_party/blink/renderer/core/loader/idna_util.h"

#include <unicode/idna.h>

#include "base/strings/utf_string_conversions.h"
#include "third_party/blink/renderer/platform/wtf/text/string_builder.h"
#include "third_party/blink/renderer/platform/wtf/text/string_utf8_adaptor.h"
#include "url/url_features.h"

namespace {

// RFC5321 says the maximum total length of a domain name is 255 octets.
constexpr int32_t kMaximumDomainNameLengthForIDNADecoding =;

// Unsafely decodes a punycode hostname to unicode (e.g. xn--fa-hia.de to
// faß.de). Only used for logging. Doesn't do any spoof checks on the output,
// so the output MUST NOT be used for anything else.
String UnsafeASCIIToIDNA(String hostname_ascii) {}

}  // namespace

namespace blink {

String GetConsoleWarningForIDNADeviationCharacters(const KURL& url) {}

}  // namespace blink