mirror of
https://github.com/ppy/osu.git
synced 2025-03-23 16:27:20 +08:00
Merge pull request #31433 from bdach/romanised-metadata-ascii-only
Constrain range of usable characters in romanised metadata to ASCII only
This commit is contained in:
commit
1ca28d74a3
@ -15,7 +15,7 @@ namespace osu.Game.Beatmaps
|
||||
/// Returns <see langword="true"/> if the character <paramref name="c"/> can be used in <see cref="BeatmapMetadata.Artist"/> and <see cref="BeatmapMetadata.Title"/> fields.
|
||||
/// Characters not matched by this method can be placed in <see cref="BeatmapMetadata.ArtistUnicode"/> and <see cref="BeatmapMetadata.TitleUnicode"/>.
|
||||
/// </summary>
|
||||
public static bool IsRomanised(char c) => c <= 0xFF;
|
||||
public static bool IsRomanised(char c) => char.IsAscii(c) && !char.IsControl(c);
|
||||
|
||||
/// <summary>
|
||||
/// Returns <see langword="true"/> if the string <paramref name="str"/> can be used in <see cref="BeatmapMetadata.Artist"/> and <see cref="BeatmapMetadata.Title"/> fields.
|
||||
|
Loading…
x
Reference in New Issue
Block a user