mihaip / infinite-mac

A classic Mac loaded with everything you'd want
https://infinitemac.org
Apache License 2.0
1.12k stars 67 forks source link

Add support for non-MacRoman archives for import #251

Open mihaip opened 7 months ago

mihaip commented 7 months ago

I'd like to add https://macintoshgarden.org/apps/bluepaint (as mentioned by @gingerbreadman in https://github.com/mihaip/infinite-mac/issues/246#issuecomment-1804236438), it currently fails with:

  File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/machfs/directory.py", line 92, in __setitem__
    raise ValueError('Could not encode key: %r' % key)
ValueError: Could not encode key: 'バージョン履歴'

The encoding at https://github.com/elliotnunn/machfs/blob/4f554286e6f5276a5b4d6d76f64fcecce31f1c26/machfs/directory.py#L88 is hardcoded as mac_roman. Though it may not be possible to do a mixed-encoding HFS volume.