gobwas / glob

Go glob
MIT License
948 stars 63 forks source link

"[]" and "?" don't match non-ascii characters #41

Open Khvalin opened 4 years ago

Khvalin commented 4 years ago

Hello,

Consider the following code fragment. Neither [] nor ? seem to match a single character if it's outside the standard ASCII range.

package main

import "fmt"
import "github.com/gobwas/glob"

func main() {
    fmt.Println(glob.MustCompile("hell[o]").Match("hello"))        // true
    fmt.Println(glob.MustCompile("ångstr[ö]m").Match("ångström"))  // false

    fmt.Println(glob.MustCompile("hell?").Match("hello"))          // true
    fmt.Println(glob.MustCompile("ångstr?m").Match("ångström"))    // false
}

Thank you.

inliquid commented 1 year ago

I have same issue.