B + C is kinda what browsers do. A + maybe C is kinda what you should do, since it's a text file.
Nobody, anywhere, should be using anything but Unicode this day and age. Not in text files, not in databases, not in network protocols. The only valid excuse is compatibility with old stuff, but limit the scope of that as much as possible, because once that text leaves that legacy system, nobody knows what it is anymore. If you had any idea how many coding systems people used to have to deal with, you'd be amazed we ever communicated at all. There are so many old standards for Japanese character sets AND encodings, I won't even try to list them. Chinese is even worse. Even the European languages had multiple character sets and multiple encodings that you might find yourself dealing with. On Mar 25, 7:24 am, Adrian Vintu <[email protected]> wrote: > You can't find the encoding the user used to write the text file. > > You can maybe: > A. force the users to write UTF-8 (or whatever the default encoding should > be) > B. assume the encoding is UTF-8 (or whatever the default encoding should be) > C. let the user change the encoding if THEY think it's not ok. > > B + C is kinda like what the browsers do. > > BR, > Adrian Vintu > > http://adrianvintu.com > > PS for UTF-8 the html should look like > <html><head><meta http-equiv="Content-Type"content="text/html; > charset=UTF-8"/> > > On Thu, Mar 25, 2010 at 3:17 PM, brijesh masrani > <[email protected]>wrote: > > > > > > > Thanks for ur replay Adrian Vintu , > > I have used that but now i came to know that The problem is with Encoding > > So if u have any idea about how to know which > > encoding was used for file than let me know. > > > On Thu, Mar 25, 2010 at 5:43 PM, brijesh masrani < > > [email protected]> wrote: > > >> Hello > > >> I am reading a txt file using Stringbuffer and try to show it in webview > >> by adding simple html tags (<html><Body>"My txt content"</html></Body>) > >> but it is not showing Spacial characters so can u please help me or any > >> other way to show txt file in Web Browser.... > > > -- > > You received this message because you are subscribed to the Google > > Groups "Android Developers" group. > > To post to this group, send email to [email protected] > > To unsubscribe from this group, send email to > > [email protected]<android-developers%2Bunsubs > > [email protected]> > > For more options, visit this group at > >http://groups.google.com/group/android-developers?hl=en > > > To unsubscribe from this group, send email to android-developers+ > > unsubscribegooglegroups.com or reply to this email with the words "REMOVE > > ME" as the subject. -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en To unsubscribe from this group, send email to android-developers+unsubscribegooglegroups.com or reply to this email with the words "REMOVE ME" as the subject.

