سؤال

We have an Android application that reads the contact details from the native AddressBook application. The character representation works well. The greek letters, the german characters with the umlaut token etc...

We ported the Android application to BB10 (BlackBerry) using the eclipse plugin.

The problem is that the produced bar file, when installed in the BB10 does not display the non ascii characters correct. We have problems with special character like those that I have mentioned above (german umlaut, greek names etc).

Do you know what the problem is? Any suggestions? Some code. In android I get the name from phones adressbook like this:

name = cur.getString(cur.getColumnIndex(ContactsContract.Contacts.DISPLAY_NAME)); //name is UTF-8.
هل كانت مفيدة؟

المحلول

It is very likely that the contacts on Blackberry are stored in a different charset than the one that you use for displaying. Without specific examples (string is x but y is being displayed) it is hard to help, though.

As an example you might need to convert the contact name from ISO-8859-1 to UTF-8 to display them. There are plenty of answers on Stack Overflow that show how that can be done.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top