Module: Net::IMAP::StringPrep::NamePrep
| Relationships & Source Files | |
| Defined in: | lib/net/imap/stringprep/nameprep.rb | 
Overview
Defined in RFC3491, the .nameprep profile of “Stringprep” is:
used by the IDNA protocol for preparing domain names; it is not designed for any other purpose. It is explicitly not designed for processing arbitrary free text and SHOULD NOT be used for that purpose.
…
This profile specifies prohibiting using the following tables…:
C.1.2 (Non-ASCII space characters)
C.2.2 (Non-ASCII control characters)
C.3 (Private use characters)
C.4 (Non-character code points)
C.5 (Surrogate codes)
C.6 (Inappropriate for plain text)
C.7 (Inappropriate for canonical representation)
C.8 (Change display properties are deprecated)
C.9 (Tagging characters)
IMPORTANT NOTE: This profile MUST be used with the IDNA protocol. The IDNA protocol has additional prohibitions that are checked outside of this profile.
Constant Summary
- 
    CHECK_BIDI =
    # File 'lib/net/imap/stringprep/nameprep.rb', line 50From RFC3491 §6 true
- 
    MAPPING_TABLES =
    # File 'lib/net/imap/stringprep/nameprep.rb', line 41From RFC3491 §3 %w[B.1 B.2].freeze 
- 
    NORMALIZATION =
    # File 'lib/net/imap/stringprep/nameprep.rb', line 44From RFC3491 §4 :nfkc 
- 
    PROHIBITED_TABLES =
    # File 'lib/net/imap/stringprep/nameprep.rb', line 47From RFC3491 §5 %w[C.1.2 C.2.2 C.3 C.4 C.5 C.6 C.7 C.8 C.9].freeze 
- 
    STRINGPREP_PROFILE =
    # File 'lib/net/imap/stringprep/nameprep.rb', line 35From RFC3491 §10 "nameprep"
- 
    UNASSIGNED_TABLE =
    # File 'lib/net/imap/stringprep/nameprep.rb', line 38From RFC3491 §2 "A.1"
Class Method Summary
- .nameprep(string, **opts) mod_func
Class Method Details
.nameprep(string, **opts) (mod_func)
[ GitHub ]# File 'lib/net/imap/stringprep/nameprep.rb', line 54
def nameprep(string, **opts) StringPrep.stringprep( string, unassigned: UNASSIGNED_TABLE, maps: MAPPING_TABLES, prohibited: PROHIBITED_TABLES, normalization: NORMALIZATION, bidi: CHECK_BIDI, profile: STRINGPREP_PROFILE, **opts, ) end