Kudos. We’ve all solved bugs with the wrong code. It was an interesting post and I found the unexpected secondary followup just as interesting. (Why did it work for, eg, Chinese, do you know?)
See, I am not an Android developer either. I could have made the same mistake. To me it comes down to — why string types?