I'm having an issue with converting foreign names to upper/lower case... It seems to omit foreign characters. Any idea how I could solve this?
String str = "SéBASTIEN DOL DE BRETAGNE";
return str.split(/[^w]/).collect { it.toLowerCase().capitalize() }.join(" ");
Current output: S Bastien Dol De Bretagne
Desired output: Sébastien Dol De Bretagne
I would like to have it work with all foreign characters (Swedish, French etc) but I'm at a lost :-)
question from:https://stackoverflow.com/questions/65916303/include-foreign-characters-in-groovy-split-collect