Copyright 2004 Fourthought, Inc. (USA). Detailed license and copyright information: http://4suite.org/COPYRIGHT Project home, documentation, distributions: http://4suite.org/
Functions:
|
The convertHost flag indicates whether to perform conversion of the ireg-name (host) component of the IRI to an RFC 2396-compatible URI reg-name (IDNA encoded), e.g. IriToUri(u'http://r\xe9sum\xe9.example.org/', convertHost=False) => u'http://r%C3%A9sum%C3%A9.example.org/' IriToUri(u'http://r\xe9sum\xe9.example.org/', convertHost=True) => u'http://xn--rsum-bpad.example.org/' Ordinarily, the IRI should be given as a unicode string. If the IRI is instead given as a byte string, then it will be assumed to be UTF-8 encoded, will be decoded accordingly, and as per the requirements of the conversion algorithm, will NOT be normalized.