Extracted from Pike v7.8 release 866 at 2016-11-06.
pike.ida.liu.se
[Top]
Standards
Standards.IDNA

Method Standards.IDNA.to_ascii()


Method to_ascii

string to_ascii(string s, int(0..1)|void allow_unassigned, int(0..1)|void use_std3_ascii_rules)

Description

The to_ascii operation takes a sequence of Unicode code points that make up one label and transforms it into a sequence of code points in the ASCII range (0..7F). If to_ascci succeeds, the original sequence and the resulting sequence are equivalent labels.

Parameter s

The sequence of Unicode code points to transform.

Parameter allow_unassigned

Set this flag if the the string to transform is a "query string", and not a "stored string". See RFC 3454.

Parameter use_std3_ascii_rules

Set this flag to enforce the restrictions on ASCII characters in host names imposed by STD3.