Skip to content

[Git Bash] Impossible to run a bash script from Windows Explorer if the path/name contains non-ASCII characters #2189

@TestPolygon

Description

@TestPolygon

Description

I cannot properly run the .sh script by clicking on it if the path to the script contains non-ASCII character(s). The script does not work at all (I see only immediately closing of a console.).

I have Windows 10, 64-bit, Git-2.21.0 64-bit.

For example:
The content of the script:

#!/bin/bash
echo "Hello there!"
sleep 3

I can properly run the script in the console (git-bash.exe) in any way.

But, if I run the script from the Windows' Explorer by double-clicking on it:

  • If the path contains only ASCII characters: everything is OK.
  • If the path contains any non-ASCII character: the script (the console) closes immediately after the start, the script does not do any work.

Examples of the pathes:
Good:

  • C:\script.sh
  • C:\#Bash\New folder\script.sh
  • C:\#Bash\Pokmon.sh

"Bad":

  • C:\#Bash\Pokémon.sh Diacritic
  • C:\#Bash\Catálogo\script.sh ES
  • C:\#Bash\Новая папка\script.sh RU
  • C:\#Bash\New folder\脚本.sh ZN
  • C:\#Bash\Surrogate Pair 💧\script.sh Emoji

I would like to be able to run scripts by double-clicking if the path contains non-ASCII characters, at least characters from BMP (Basic Multilingual Plane).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions