Changeset 7888 for branches/gajim_0.11/src/common/helpers.py
- Timestamp:
- 01/23/07 21:32:43 (23 months ago)
- Files:
-
- 1 modified
-
branches/gajim_0.11/src/common/helpers.py (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/gajim_0.11/src/common/helpers.py
r7787 r7888 26 26 import sha 27 27 from encodings.punycode import punycode_encode 28 from encodings import idna 28 29 29 30 import gajim … … 85 86 86 87 return prep(*decompose_jid(jidstring)) 88 89 def idn_to_ascii(host): 90 '''convert IDN (Internationalized Domain Names) to ACE (ASCII-compatible encoding)''' 91 labels = idna.dots.split(host) 92 converted_labels = [] 93 for label in labels: 94 converted_labels.append(idna.ToASCII(label)) 95 return ".".join(converted_labels) 87 96 88 97 def parse_resource(resource):
