WAI
Status Update
Comments
en...@google.com <en...@google.com>
nf...@google.com <nf...@google.com> #2
From consulting with an I18N expert it sounds like the expectations here are incorrect.
According to the spec there is no NFD decomposition for "Ł" or "ł".
"There is no combining accent that adds a slash to a letter, so it's not possible to decompose it to L plus combining slash. The same goes for Ø, which also can't be decomposed as O plus combining slash."
I've not read this myself, but I believe this is the relevant spec:
http://www.unicode.org/reports/tr15/tr15-23.html#Decomposition
It sounds to us like you're looking for something like an ICU "Latin-ASCII" Transliterator:
e.g.
http://unicode.org/cldr/utility/transform.jsp?a=Latin-ASCII&b=%C5%81%C5%82%C5%9B%C5%BA%C5%BC%C3%B3%C4%87
Unfortunately, AFAIK, Android doesn't currently include equivalent behavior in the platform APIs.
According to the spec there is no NFD decomposition for "Ł" or "ł".
"There is no combining accent that adds a slash to a letter, so it's not possible to decompose it to L plus combining slash. The same goes for Ø, which also can't be decomposed as O plus combining slash."
I've not read this myself, but I believe this is the relevant spec:
It sounds to us like you're looking for something like an ICU "Latin-ASCII" Transliterator:
e.g.
Unfortunately, AFAIK, Android doesn't currently include equivalent behavior in the platform APIs.
Description
Input: "Ł" or "ł" (322, 321 ASCII value).
Desired output: "L" or "l" (76, 108 ASCII value).
Real output: "Ł" or "ł" (322, 321 ASCII value). So without any change.
Tested on Nexus 5 with Android 6.0 (MRA58K) and 5.1.1 OnePlus 2, both with same (wrong) result. Other Polish characters ex. "ś", "ź", "ż", "ó", "ć" are correctly changed to "s", "z", "z", "o", "c".
Fix (probably not most performance effective):
if(characterValue == 321) {
characterValue = 76;//Ł to L
} else if(characterValue == 322) {
characterValue = 108;//ł to l
}