Path: csiph.com!x330-a1.tempe.blueboxinc.net!newsfeed.hal-mli.net!feeder1.hal-mli.net!nx01.iad01.newshosting.com!newshosting.com!69.16.185.11.MISMATCH!npeer01.iad.highwinds-media.com!news.highwinds-media.com!feed-me.highwinds-media.com!postnews.google.com!a7g2000yqb.googlegroups.com!not-for-mail From: bob Newsgroups: comp.lang.java.programmer Subject: Re: ascii char 26 Date: Mon, 12 Sep 2011 01:30:42 -0700 (PDT) Organization: http://groups.google.com Lines: 38 Message-ID: <72c72262-83cc-4f76-b9fb-c7e2f90eca8a@a7g2000yqb.googlegroups.com> References: <16f8836c-27b9-483b-a71f-61d7d6cfd188@i2g2000yqm.googlegroups.com> <63554bdb-dab4-43e7-b809-5128fd831f3c@m38g2000vbn.googlegroups.com> NNTP-Posting-Host: 72.190.77.145 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: posting.google.com 1315816365 11411 127.0.0.1 (12 Sep 2011 08:32:45 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Mon, 12 Sep 2011 08:32:45 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: a7g2000yqb.googlegroups.com; posting-host=72.190.77.145; posting-account=v1lx5wkAAAALWYfGBkwkMb2guPF9cW2u User-Agent: G2/1.0 X-Google-Web-Client: true X-Google-Header-Order: HUALESNKRC X-HTTP-UserAgent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:6.0.2) Gecko/20100101 Firefox/6.0.2,gzip(gfe) Xref: x330-a1.tempe.blueboxinc.net comp.lang.java.programmer:7867 Loading UTF-8 data into a WebView doesn't work right. Please see this thread: http://groups.google.com/group/android-developers/browse_thread/thread/c056= cc101c8676e5?hl=3Den Thanks. On Sep 11, 9:25=A0pm, Joshua Cranmer wrote: > On 9/11/2011 9:12 PM, bob wrote: > > > You're right. =A0I messed up, and it was the em dash. =A0It turned into= 26 > > after going thru 'b =3D html.getBytes("US-ASCII");' > > > Here's the new code: > > Hardcoding a list of tables is generally not a good thing; in > particular, I don't think it's going to solve your problems. I have seen > sites that use the Unicode ff and fi ligatures instead of relying on > fonts to automatically pick up on that as well. > > If I may ask, why do you need to convert the string to US-ASCII as > opposed to UTF-8? That is going to cause major issues for the ~90% of > the world that doesn't speak English as their main language. > > > Also, I'm on Android 2.1, so import java.text.Normalizer; doesn't > > work. > > It shouldn't be that hard to find other Java Unicode normalization > libraries out there. > > -- > Beware of bugs in the above code; I have only proved it correct, not > tried it. -- Donald E. Knuth