2018-09-17 00:27:00 +00:00
|
|
|
from .core import *
|
|
|
|
from .codec import *
|
2022-01-24 04:07:52 +00:00
|
|
|
from typing import Any, Union
|
2018-09-17 00:27:00 +00:00
|
|
|
|
2022-01-24 04:07:52 +00:00
|
|
|
def ToASCII(label: str) -> bytes:
|
2018-09-17 00:27:00 +00:00
|
|
|
return encode(label)
|
|
|
|
|
2022-01-24 04:07:52 +00:00
|
|
|
def ToUnicode(label: Union[bytes, bytearray]) -> str:
|
2018-09-17 00:27:00 +00:00
|
|
|
return decode(label)
|
|
|
|
|
2022-01-24 04:07:52 +00:00
|
|
|
def nameprep(s: Any) -> None:
|
|
|
|
raise NotImplementedError('IDNA 2008 does not utilise nameprep protocol')
|
2018-09-17 00:27:00 +00:00
|
|
|
|