1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-14 17:57:38 +08:00
osu-lazer/osu.Game/IO/Archives
Dean Herbert c8f7f2215b
Force encoding to Shift-JIS for archive filenames
After way too much time investigating this, the encoding situation is
not great right now.

- Stable sets the "default code page" to be used for encoding filenames
to Shift-JIS (932):
c29ebd7fc5/osu!/GameBase.cs#L3099
- Lazer does nothing (therefore using UTF-8).

When importing to lazer, stable files are assumed to be UTF-8. This
means that the linked beatmaps don't work correctly. Forcing lazer to
decompress *and* compress using Shift-JIS will fix this.

Here's a rough idea of how things look for japanese character filenames
in current `master`:

| | stable | lazer |
|--------|--------|--------|
| export encoding | shift-jis | utf8 |
| utf8 [bit flag](https://superuser.com/a/1507988) set |  |  |
| import stable export osz |   |  |
| import lazer export osz |  |  |
| windows unzip |  |  |
| macos unzip |  |  |

and after this change

| | stable | lazer |
|--------|--------|--------|
| export encoding | shift-jis | shift-jis |
| utf8 [bit flag](https://superuser.com/a/1507988) set |  |  |
| import stable export osz |   |  |
| import lazer export osz |  |  |
| windows unzip |  |  |
| macos unzip |  |  |

A future endeavour to improve compatibility would be to look at setting
the utf8 flag in lazer, switching the default to utf8, and ensuring the
stable supports this flag (I don't believe it does right now).
2024-04-30 01:27:47 +08:00
..
ArchiveReader.cs Automated #nullable processing 2022-06-17 16:37:17 +09:00
ByteArrayArchiveReader.cs Rename ArchiveReader implementations to read better 2023-09-14 13:36:07 +09:00
DirectoryArchiveReader.cs Rename ArchiveReader implementations to read better 2023-09-14 13:36:07 +09:00
MemoryStreamArchiveReader.cs Fix MemoryStreamArchiveReader.GetStream() failing in some cases 2023-09-18 11:50:36 +02:00
SingleFileArchiveReader.cs Rename ArchiveReader implementations to read better 2023-09-14 13:36:07 +09:00
ZipArchiveReader.cs Force encoding to Shift-JIS for archive filenames 2024-04-30 01:27:47 +08:00