Search code examples
svnencodingcommand-lineutf-8

Command-line svn will not execute any options - "can't convert string from native encoding to UTF-8"


I've been using svn (through TortoiseSVN) for many years. I recently (months) started using it for Unreal 5. I just saw a new message when running command line svn: "Can't convert string from native encoding to 'UTF-8'".

I've looked around and seen that this message can result from non-UTF-8 characters in filenames or commits, but this affects all my repositories, some of which are purely my own, and do not have recent commits (so can't be affected by that issue).

No svn commands are working, gui or commandline. I cannot commit, update, view repositories, switch branches, etc, etc.

The exact command I tried:

> svn help
svn: E720087: Can't convert string from native encoding to 'UTF-8':
svn: E720087: help

This should be pretty basic behavior and just display the help for svn without needing to go through any potentially-borked repositories. svn gives the exact same response for any option attempt, replacing 'help' with whatever option I tried.

I'm using the default Consolas font in Windows cmd.exe

My system is and always has been in en-us on all available options

I've tried restarting, reinstalling TortoiseSVN, upgrading to latest TortoiseSVN, copy-pasting the command from a text editor into cmd.

The only recent changes to my system are adding an entry to PATH (which Windows has made basically foolproof; and installing the trial version of JetBrains Rider. Undoing the PATH change doesn't affect the result.


Solution

  • I wasn't able to find the cause for this problem. At no point did I personally edit any locale settings, nor would I have expected any edits from any normal operation of any programs. I do not deal with other locales.

    The exact solution for my issue:

    • Open intl.cpl (Region control panel item)
    • Switch to Administrative tab.
    • Under "Current language for non-Unicode programs", I had listed English (United States).
    • Click on Change System Locale. On my problem system, the Region Settings popup now shows Afrikaans as the current system locale - this is the topmost entry in the list, I have never used Afrikaans, and changing this setting has no effect on the status of this dropdown. On my functioning system, the Region Settings popup shows English (United States) as expected.
    • On the problem system, I changed the dropdown to English, and clicked the "Beta: Use Unicde UFT-8 for worldwide language support" option, then OK'd my way out of all popups.

    This fixed my svn issues, but I suspect there is more at play. If I figure out the root cause of this I'll update.