I have an Android application where I read sms messages and send it to the google app engine server. Some of the users are complaining that the certain languages are not coming through properly.
// Execute query
cursor = context.getContentResolver().query(
SMS_PROVIDER_URI,
SMS_QUERY_FIELDS,
"date >= " + startDate.getTime(), // selection - get messages > startDate
null, // selectionArgs
"date ASC"); // order - get oldest messages first
// Iterate results
if (cursor != null && cursor.moveToFirst()) {
// read through all the sms and create a list
do {
String sender = cursor.getString(0);
String message = cursor.getString(2);
boolean isIncomingMessage = cursor.getString(3).contains("1");
Date date = new Date(cursor.getLong(1));
String contactName = ContactLookup.lookup(context, sender);
smsList.add(new SMSMessageInfo(sender, contactName,
message, isIncomingMessage, date));
} while (cursor.moveToNext());
}
message variable contains sms messages from different languages. How do I support it? Also, I need to send it to my server (python) and how do I translate the unicode on the sever?