osu/osu.Game/Database
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
..
BackgroundDataStoreProcessor.cs Merge pull request #27866 from Joehuu/fix-online-score-export 2024-04-23 09:08:04 +02:00
BeatmapExporter.cs
BeatmapLookupCache.cs
EmptyRealmSet.cs
ICanAcceptFiles.cs
IHasFiles.cs
IHasGuidPrimaryKey.cs
IHasNamedFiles.cs
IHasOnlineID.cs
IHasPrimaryKey.cs
IHasRealmFiles.cs Remove `IScoreInfo : IHasNamedFiles` inheritance 2023-10-26 14:58:33 +02:00
IModelDownloader.cs
IModelFileManager.cs
IModelImporter.cs
IModelManager.cs
INamedFile.cs
INamedFileInfo.cs
INamedFileUsage.cs
IPostNotifications.cs
ISoftDelete.cs
ImportParameters.cs Fix skin editor freezing game if opened during active gameplay 2023-10-27 14:34:30 +02:00
ImportProgressNotification.cs
ImportTask.cs Bring back disposal of stream after copy-out to `MemoryStream` 2023-09-14 19:36:35 +02:00
LegacyArchiveExporter.cs Force encoding to Shift-JIS for archive filenames 2024-04-30 01:27:47 +08:00
LegacyBeatmapExporter.cs Fix incorrect legacy conversion when B-splines are used 2023-11-20 15:08:58 +09:00
LegacyBeatmapImporter.cs Fix legacy beatmap importer not always handling nested paths correctly 2023-10-03 16:01:17 +09:00
LegacyCollectionImporter.cs
LegacyExporter.cs
LegacyImportManager.cs Extract common method for determining stable import usability of directory 2023-12-15 15:42:19 +01:00
LegacyModelImporter.cs
LegacyScoreExporter.cs
LegacyScoreImporter.cs
LegacySkinExporter.cs
LegacySkinImporter.cs
Live.cs
MemoryCachingComponent.cs
MissingBeatmapNotification.cs Fix notification text sets overwriting each other 2023-09-19 11:12:58 +02:00
ModelDownloader.cs
ModelManager.cs Add feedback to delete button even when no-op 2024-02-18 21:52:23 -08:00
OnlineLookupCache.cs
RealmAccess.cs Use ObjectDisposedException.ThrowIf throw helper 2024-03-05 09:58:46 +01:00
RealmArchiveModelImporter.cs Remove unused method 2024-04-29 18:48:07 +08:00
RealmExtensions.cs Fill out xmldoc and adjust inline commentary 2023-08-16 09:40:46 +02:00
RealmFileStore.cs Reference property via `nameof` rather than hardcoding 2024-01-09 11:49:42 +01:00
RealmLive.cs Add helper method for safer realm `Find<T>` 2023-08-16 15:37:09 +09:00
RealmLiveUnmanaged.cs
RealmObjectExtensions.cs
StandardisedScoreMigrationTools.cs Fix broken english 2024-03-06 21:30:31 +01:00
TooManyDownloadsNotification.cs
UserLookupCache.cs