1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-11 11:28:00 +08:00
osu-lazer/osu.Game/IO
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
..
Archives Force encoding to Shift-JIS for archive filenames 2024-04-30 01:27:47 +08:00
FileAbstraction Automated pass 2023-06-24 01:00:03 +09:00
Legacy Automated pass 2023-06-24 01:00:03 +09:00
Serialization Automated pass 2023-06-24 01:00:03 +09:00
FileInfo.cs Fix various other inspections 2023-10-17 17:48:51 +09:00
HardLinkHelper.cs Fix compile error (reserved name) 2024-02-02 21:28:51 +09:00
IFileInfo.cs Automated #nullable processing 2022-06-17 16:37:17 +09:00
IStorageResourceProvider.cs Update R# + fix inspections 2024-02-02 21:00:28 +09:00
LineBufferedReader.cs Fix crash on mobile releases when attempting to read any file 2022-07-09 06:01:22 +09:00
MigratableStorage.cs Add retry loop to avoid log export failing occasionally on windows 2024-01-25 13:53:36 +09:00
OsuStorage.cs Manual fixes to reduce warnings to zero 2023-06-24 01:52:53 +09:00
StableStorage.cs Automated #nullable processing 2022-06-17 16:37:17 +09:00
WrappedStorage.cs Use ArgumentException.ThrowIfNullOrEmpty throw helper 2024-03-05 10:20:57 +01:00