If the received character is U+0020 instead of U+1200, then chances are that the message is being restricted to 7-bit somewhere along the line. This is somewhat alluded to in the SDK Reference http://developer.android.com/reference/android/telephony/SmsMessage.html#calculateLength(java.lang.CharSequence,%20boolean )
Another problem may be the font. Have you installed the Ethiopian fonts in your device or emulator? I just tried adding ቁ into an Android application's string.xml res file. On both the emulator and the Droid, the character is displayed as a small rectangle. It may help in debugging to try some Latin-1/ISO-8859-1 characters, such as U+00E3. This would test the 7-bit issue without having to install Ethiopian fonts on the emulator or device. On Thu, Jan 21, 2010 at 10:53 PM, andu <alemf...@yahoo.com> wrote: > Hello How are you > > I have tried to send the sms with unicode character to the android > phone itself and accept the message by my application (using > BroadcastReceiver ...) to view its content. but still the unicode > character is displayed as space. And I tried to see its code using > codePointAt( ) and it displays number 32. > > What do you suggest? > Should I change the encoding for my code, JVM, ...? How can I change > the encoding of my program? I am developing my application by Eclipse > and Android ADT. > > Thank you for response. > > and also I waiting your response > > Andu > > > On Jan 1, 1:49 am, Frank Weiss <fewe...@gmail.com> wrote: > > The code looks good AFAICT. > > > > Please give the actual before/after characters that are coming out wrong. > > For example, try the Ethiopian syllable qu, U+1241. If it's coming across > as > > a box followed by an "A", then the receiver has gotten two characters, > > U+0012 and U+0041. I really need to see the hexadecimal data in your sent > > and received SMS messages to figure out what's going wrong. > > > > I would also suggest that using the debugger or android.util.Log, instead > of > > Toast, would be a better way to debug. > > > > On Thu, Dec 31, 2009 at 2:26 AM, andu <alemf...@yahoo.com> wrote: > > > To send the message I have used the following function: > > > > > public boolean sendSMSMessage(String compiledContent, String > > > DistinationAddress) > > > { > > > String receiverPhoneNumber = DistinationAddress; > > > String messageCenterPhoneNumber = ""; > > > SmsManager smsMgr = SmsManager.getDefault(); > > > smsMgr.sendTextMessage(receiverPhoneNumber, null, > > > compiledContent, > > > null, null); > > > return isSent; > > > } > > > > > To receive the message I have used the following function: > > > > > @Override > > > public void onReceive(Context context, Intent intent) { > > > Bundle bundle = intent.getExtras(); > > > > > if(bundle != null) > > > { > > > Object messages[] = (Object[]) bundle.get("pdus"); > > > SmsMessage smsMessage[] = new > SmsMessage[messages.length]; > > > for (int n = 0; n < messages.length; n++) > > > { > > > smsMessage[n] = SmsMessage.createFromPdu((byte[]) > > > messages > > > [n]); > > > } > > > > > // show first message > > > Toast toast = Toast.makeText(context, " Brhp Received > SMS: " > > > + smsMessage[0].getMessageBody()+ "from " + smsMessage > > > [0].getOriginatingAddress(), Toast.LENGTH_LONG); > > > toast.show(); > > > > > String messageBody = smsMessage[0].getMessageBody(); > > > String messageSource = > > > smsMessage[0].getOriginatingAddress(); > > > } > > > > > } > > > > > On Dec 29, 1:02 am, andu <alemf...@yahoo.com> wrote: > > > > How are you all? > > > > > > I am developing application for android phone. Currently I am testing > > > > my system in the emulator. In my application, I want to send unicode > > > > character (Amharic language character) via SMS to the other emulator > > > > instance. But in the receiver side, the message is not viewed > > > > properly. I think the problem is some character encoding related > > > > problem. > > > > > > In addition similar problem happens for texts which are queried for > > > > the sqlite database. that is when I send a query result via SMS the > > > > same problem occurs. Please help me. > > > > > > Sorry for posting the same message again. Please help me. > > > > > > Thank you > > > > > > Andu. > > > > > -- > > > You received this message because you are subscribed to the Google > > > Groups "Android Developers" group. > > > To post to this group, send email to > android-developers@googlegroups.com > > > To unsubscribe from this group, send email to > > > android-developers+unsubscr...@googlegroups.com<android-developers%2bunsubscr...@googlegroups.com> > <android-developers%2bunsubscr...@googlegroups.com<android-developers%252bunsubscr...@googlegroups.com> > > > > > For more options, visit this group at > > >http://groups.google.com/group/android-developers?hl=en > > -- > You received this message because you are subscribed to the Google > Groups "Android Developers" group. > To post to this group, send email to android-developers@googlegroups.com > To unsubscribe from this group, send email to > android-developers+unsubscr...@googlegroups.com<android-developers%2bunsubscr...@googlegroups.com> > For more options, visit this group at > http://groups.google.com/group/android-developers?hl=en > -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en