SYNOPSIS

  use Net::IDN::Nameprep;
  $output = nameprep $input;

DESCRIPTION

This module implements the nameprep specification, which describes how to prepare internationalized domain name (\s-1IDN\s0) labels in order to increase the likelihood that name input and name comparison work in ways that make sense for typical users throughout the world. Nameprep is a profile of the stringprep protocol and is used as part of a suite of on-the-wire protocols for internationalizing the Domain Name System (\s-1DNS\s0).

FUNCTIONS

This module implements a single function, \*(C`nameprep\*(C', which is exported by default. Processes $input according to the nameprep specification and returns the result. If $input contains characters not allowed for nameprep, it throws an exception (so use \*(C`eval\*(C' if necessary). This function takes the following optional parameter:

AllowUnassigned

(boolean) If set to a false value, unassigned code points in $input are not allowed. False \s-1MUST\s0 be used for stored strings. True \s-1MAY\s0 be used for queries. The default is true (backwards compatibility).

AUTHOR

Claus Fa\*:rber <[email protected]>

Previous versions written by Tatsuhiko Miyagawa <[email protected]>

LICENSE

Copyright 2007-2010 Claus Fa\*:rber.

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

RELATED TO Net::IDN::Nameprep…

Unicode::Stringprep, \s-1RFC\s0 3491 (<http://www.ietf.org/rfc/rfc3491.txt>)