mirror of
https://github.com/Threnklyn/esphome-dev.git
synced 2026-06-13 08:03:32 +02:00
Fix dashboard wizard unicode (#494)
* Fix dashboard wizard unicode Fixes https://github.com/esphome/issues/issues/169 * Fix password md5
This commit is contained in:
@@ -69,3 +69,13 @@ def indexbytes(buf, i):
|
||||
return buf[i]
|
||||
else:
|
||||
return ord(buf[i])
|
||||
|
||||
|
||||
if IS_PY2:
|
||||
def decode_text(data, encoding='utf-8', errors='strict'):
|
||||
# type: (str, str, str) -> unicode
|
||||
return unicode(data, encoding='utf-8', errors=errors)
|
||||
else:
|
||||
def decode_text(data, encoding='utf-8', errors='strict'):
|
||||
# type: (bytes, str, str) -> str
|
||||
return data.decode(encoding='utf-8', errors=errors)
|
||||
|
||||
Reference in New Issue
Block a user