def _toShiftJisString(byteString):
    byteString = byteString.split(b"\x00")[0]
    try:
        return byteString.decode("shift_jis")
    except __HOLE__:
        # discard truncated sjis char
        return byteString[:-1].decode("shift_jis")
dataset/ETHPy150Open sugiany/blender_mmd_tools/mmd_tools/core/vmd/__init__.py/_toShiftJisString