I'm trying to get case folding to be consistent between three languages (C++, Python and Golang) because I need to be able to check if a string matches the one saved no matter the language.
An example problematic word is the German word "grüßen" which in uppercase is "GRÜSSEN" (Note the 'ß' becomes two characters as 'SS').
- C++ works well using boost::locale text conversion docs
- Python 3 also works through str.casefold() casefold docs
- However, Golang doesn't seem to have a way to do proper case folding. golang playground example
Is there some way to do this that I'm missing, or does this bug at the end of unicode's documentation apply to all usages of text conversion in golang? If so, what are my options for case folding other than writing it in cgo?
func to(_case int, r rune, caseRange []CaseRange) rune {
is it even possible to return multiple rules at all. – Seekerimport "golang.org/x/text/cases"
I can doc := cases.Fold()
thenc.String("grüßen")
and it works. – Concur