AppVeyor had the problem with git branch name by Unicode

lb.thanh's Avatar

lb.thanh

13 Sep, 2018 05:37 AM

When git branch set name by Unicode charset below error was raised.

***************************
Build started
git clone -q --branch=テスト git@github.com:xxx/yyy.git C:\projects\yyy
fatal: Remote branch リファクタテスト not found in upstream origin
Command exited with code 128
***************************

Is this well know issue?

Thanks so much.

  1. 1 Posted by galeksandrp on 21 Nov, 2018 09:02 PM

    galeksandrp's Avatar

    TLDR: Use command line control intl.cpl,, /f:"%APPVEYOR_BUILD_FOLDER%\locale.xml", where locale.xml is

    <gs:GlobalizationServices xmlns:gs="urn:longhornGlobalizationUnattend">
    <gs:UserList>
    <gs:User UserID="Current" CopySettingsToDefaultUserAcct="true" CopySettingsToSystemAcct="true"/>
    </gs:UserList>
    <!-- system locale --><gs:SystemLocale Name="en-US" />
    </gs:GlobalizationServices>
    

    where en-US is locale in which your branch name is set.

    This bug is due to non-set setting "default language for non-unicode programs". When this setting is not set, programs that does not use Windows unicode variant* or not use unicode at all produce files with corrupted filenames. And since git branch is just file (in .git hidden folder) where filename is branch name, this setting affects git as well.

    After this settings is set in control panel, computer must be rebooted. In 2018 this is not problem in AppVeyor (powershell Reboot-Computer does the trick). Actual problem is that command used to programmatically change this setting (powershell Set-WinSystemLocale) hangs on AppVeyor.

    So you need to programmatically communicate with Control Panel, and there is control tool for that mentioned in TLDR.

    *UTF-16, as far as I know

  2. 2 Posted by lb.thanh on 22 Nov, 2018 01:12 AM

    lb.thanh's Avatar

    Thanks for your explanation.
    I chose Linux based to build the project.

Reply to this discussion

Internal reply

Formatting help / Preview (switch to plain text) No formatting (switch to Markdown)

Attaching KB article:

»

Attached Files

You can attach files up to 10MB

If you don't have an account yet, we need to confirm you're human and not a machine trying to post spam.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac