No, it's just that I've already told everyone else on the planet (it seems) not to do this! I've been crusading on this for decades... :=)
Do not ever use the String(byte[]) constructor. Do not ever pass up an opportunity to explicitly supply a character encoding. Always use UTF-8 when you have control over the encoding. But Never, ever, leave it to the platform default. You must always find out the encoding somewhere. If it really is just a bunch of bytes of unknown encoding, and you can't change that, then you will need to allow the user to make an alternative selection -- but start with UTF-8 as the default if at all possible. Nobody, anywhere, should be using anything but UTF-8 for new data these days. The world has moved far beyond all these petty national encodings. So the first thing is to ask -- where do these bytes come from? If they're not already in UTF-8, can I change something to get them in UTF-8? If not, can I get the supplier of these bytes to tell me what encoding they're in (such as the Content-Type: HTTP file)? If not, how can I let the user tell me the encoding and character set, if I guess wrong? On Apr 21, 5:41 pm, Moto <medicalsou...@gmail.com> wrote: > I guess no one runs into this kind of issues...??? > > On Apr 21, 7:47 am, Moto <medicalsou...@gmail.com> wrote: > > > > > > > I'm sure I'm doing something wrong!? > > > On Apr 21, 12:09 am, Moto <medicalsou...@gmail.com> wrote: > > > > I get an array of bytes and I convert that to a String in the > > > following way: > > > blockString = new String(tagBlock); > > > > The results are good for english and some other languages but Russian, > > > Spanish, Chinese, and many others aren't displayed properly... The > > > only way to diplay correctly is to find the correct encoding and > > > decode the language like this: > > > blockString = new String(tagBlock,"ISO8859_1"); > > > > But how can I do this better? How can I not have to worry about > > > string encoding? It's turning out to be a problem back in Japan and > > > other countries with my app :( > > > > Thanks for any help! > > > -Moto! > > > > -- > > > 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 > > > athttp://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 > > athttp://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 > athttp://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