Simon, Make 100% sure that your source files are UTF-8 encoded.
Daniel On Mon, Nov 8, 2010 at 4:46 PM, Simon MacDonald <simon.macdon...@gmail.com> wrote: > Hi all, > I'm wondering if I found a bug in Android. When I run this code on my > laptop: > String myData = "hockey,marché,football"; > byte[] rawData; > rawData = myData.getBytes("UTF-8"); > > System.out.println("UTF-8 decoded: "+new String(rawData,"UTF-8")); > System.out.println("Default decoded: "+new String(rawData)); > I get the output: > > UTF-8 decoded: hockey,marché,football > Default decoded: hockey,marché,football > However, when I run the same code in an Android application and view the > output it "adb logcat" I get: > D/FileUtils( 485): UTF-8 decoded: hockey,march∩┐╜,football > D/FileUtils( 485): Default decoded: hockey,march∩┐╜,football > I get the same issue if I change the locale of my phone to French (Canada) > as well. It doesn't seem like French characters are getting encoded > properly. > Any thoughts? > Simon Mac Donald > http://hi.im/simonmacdonald > > -- > 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 -- Daniel Drozdzewski -- 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