Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add option to force C.utf locale #100

Merged
merged 2 commits into from
Dec 19, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions src/XIVLauncher.Core/Components/MainPage/MainPage.cs
Original file line number Diff line number Diff line change
Expand Up @@ -685,6 +685,13 @@ public async Task<Process> StartGameAndAddon(Launcher.LoginResult loginResult, b

IGameRunner runner;

// Hack: Force C.utf8 to fix incorrect unicode paths
if (App.Settings.FixLocale.Value && !System.OperatingSystem.IsWindows())
{
System.Environment.SetEnvironmentVariable("LC_ALL", "C.utf8");
System.Environment.SetEnvironmentVariable("LC_CTYPE", "C.utf8");
}

// Hack: Strip out gameoverlayrenderer.so entries from LD_PRELOAD
if (App.Settings.FixLDP.Value)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ public class SettingsTabTroubleshooting : SettingsTab
{
new SettingsEntry<bool>("Hack: Disable gameoverlayrenderer.so", "Fixes some stuttering issues after 40+ minutes, but may affect steam overlay and input.", () => Program.Config.FixLDP ?? false, x => Program.Config.FixLDP = x),
new SettingsEntry<bool>("Hack: XMODIFIERS=\"@im=null\"", "Fixes some mouse-related issues, some stuttering issues", () => Program.Config.FixIM ?? false, x => Program.Config.FixIM = x),
new SettingsEntry<bool>("Hack: Force locale to C.utf8", "Sets LC_ALL and LC_CTYPE to C.utf8. This can fix some issues with non-Latin unicode characters in file paths.", () => Program.Config.FixLocale ?? false, b => Program.Config.FixLocale = b),
};
public override string Title => "Troubleshooting";

Expand Down
2 changes: 2 additions & 0 deletions src/XIVLauncher.Core/Configuration/ILauncherConfig.cs
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,8 @@ public interface ILauncherConfig

public string? WineDebugVars { get; set; }

public bool? FixLocale { get; set; }

public bool? FixLDP { get; set; }

public bool? FixIM { get; set; }
Expand Down
1 change: 1 addition & 0 deletions src/XIVLauncher.Core/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,7 @@ private static void LoadConfig(Storage storage)

Config.FixLDP ??= false;
Config.FixIM ??= false;
Config.FixLocale ??= false;
}

public const uint STEAM_APP_ID = 39210;
Expand Down
Loading