# File lib/addressable/uri.rb, line 1000
    def normalized_host
      self.host && @normalized_host ||= (begin
        if self.host != nil
          if !self.host.strip.empty?
            result = ::Addressable::IDNA.to_ascii(
              URI.unencode_component(self.host.strip.downcase)
            )
            if result[-1..-1] == "."
              # Trailing dots are unnecessary
              result = result[0...-1]
            end
            result
          else
            EMPTY_STR
          end
        else
          nil
        end
      end)
    end