#2426·shellcheck

Weird behaviour when bash function has the Unicode name

Author: giappiCreated Dec 30, 2021Updated Sep 24, 2026

For bugs

  • Rule Id (if any, e.g. SC1000): SC1036, SC1088
  • My shellcheck version (shellcheck --version or 'online'): online
  • I tried on shellcheck.net and verified that this is still a problem on the latest commit
  • It's not reproducible on shellcheck.net, but I think that's because it's an OS, configuration or encoding issue

For new checks and feature suggestions

Here's a snippet or screenshot that shows the problem:

bash
#!/bin/bash

function ■()
{
    echo "■ $@"
}

Here's what shellcheck currently says:

Line 3	SC1036: '(' is invalid here. Did you forget to escape it?
Line 3	SC1088: Parsing stopped here. Invalid use of parentheses?

Here's what I wanted or expected to see:

Unicode is valid bash function name. In case of it does not support Unicode, I think it should show the error message like "invalid function name".