Skip to content

bug: Non english standard characters break the raw query #4

Description

@DagW

🌧 Describe the problem

Search queries Swedish like letar efter söndriga saker or in spanish with ñ break the raw query, and result in short search strings from .raw

Ex. letar efter söndriga saker -> letar efter s

The default cutFn is overridden with to allow all characters.

I suspect the behaviour comes from isWord in the scanner.

⛅ Expected behavior

Expected behaviour would be to also allow these characters.

🔄 Minimal reproduction

func isWord(ch rune) bool {
	return ch >= '!' && ch <= '~' && ch != ':'
}

func TestIsWord(t *testing.T) {
	fmt.Println(isWord('ñ')) // false
}

💠 Version: go-queryparser

v3.0.0

🖥 Version: Operating system

linux/ubuntu

⚙ Additional context

No response

🤝 Requirements

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions