mirror of
https://github.com/ps2dev/mymc.git
synced 2024-11-24 03:20:10 +01:00
Leaving utf-8 as default encoding instead of ASCII
Less compatibility issues this way
This commit is contained in:
parent
3adf9aa8cf
commit
779a1ddaa3
@ -68,14 +68,14 @@ if hasattr(struct, "Struct"):
|
||||
ent = list(ent)
|
||||
ent[3] = _tod_struct.unpack(ent[3])
|
||||
ent[6] = _tod_struct.unpack(ent[6])
|
||||
ent[8] = zero_terminate(ent[8]).decode("ascii")
|
||||
ent[8] = zero_terminate(ent[8]).decode("utf-8")
|
||||
return ent
|
||||
|
||||
def pack_dirent(ent):
|
||||
ent = list(ent)
|
||||
ent[3] = _tod_struct.pack(*ent[3])
|
||||
ent[6] = _tod_struct.pack(*ent[6])
|
||||
ent[8] = ent[8].encode("ascii")
|
||||
ent[8] = ent[8].encode("utf-8")
|
||||
return _dirent_struct.pack(*ent)
|
||||
else:
|
||||
def unpack_tod(s):
|
||||
@ -99,7 +99,7 @@ else:
|
||||
ent = list(ent)
|
||||
ent[3] = struct.pack(_tod_fmt, *ent[3])
|
||||
ent[6] = struct.pack(_tod_fmt, *ent[6])
|
||||
ent[8] = ent[8].encode("ascii")
|
||||
ent[8] = ent[8].encode("utf-8")
|
||||
return struct.pack(_dirent_fmt, *ent)
|
||||
|
||||
def time_to_tod(when):
|
||||
|
Loading…
Reference in New Issue
Block a user