gobwas/glob

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

Khvalin opened this issue · 1 comments

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.

I have same issue.