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.

  3. Owen McDonnell closed this discussion on 27 Jun, 2019 05:27 AM.

Comments are currently closed for this discussion. You can start a new one.

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

Recent Discussions

21 Aug, 2019 11:06 PM
21 Aug, 2019 02:08 PM
21 Aug, 2019 01:37 PM
21 Aug, 2019 10:21 AM
21 Aug, 2019 09:10 AM

 

21 Aug, 2019 05:56 AM
21 Aug, 2019 03:08 AM
20 Aug, 2019 11:33 PM
20 Aug, 2019 08:07 PM
20 Aug, 2019 05:50 PM
20 Aug, 2019 12:35 PM