Path: csiph.com!newsfeed.hal-mli.net!feeder3.hal-mli.net!newsfeed.hal-mli.net!feeder1.hal-mli.net!weretis.net!feeder1.news.weretis.net!feeder.erje.net!eu.feeder.erje.net!border3.nntp.ams.giganews.com!Xl.tags.giganews.com!border1.nntp.ams.giganews.com!nntp.giganews.com!local2.nntp.ams.giganews.com!nntp.bt.com!news.bt.com.POSTED!not-for-mail NNTP-Posting-Date: Sat, 05 Jan 2013 06:59:17 -0600 From: "Chris Uppal" Newsgroups: comp.lang.java.programmer References: <0f28108e-6d35-43a1-a9df-b6c5636fb0ec@googlegroups.com> <50e4d730$0$288$14726298@news.sunsite.dk> <24e3a8de-a422-4d4e-a319-aeedddb9df03@googlegroups.com> Subject: Re: question on java lang spec chapter 3.3 (unicode char lexing) Date: Sat, 5 Jan 2013 12:58:57 -0000 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.5512 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5512 X-RFC2646: Format=Flowed; Response Message-ID: Lines: 16 X-Usenet-Provider: http://www.giganews.com X-AuthenticatedUsername: NoAuthUser X-Trace: sv3-wL2sRL9pe2C4Oy8wXPXJTvYlriLNzSxGGPGQIs72MGkIrj+eZE13v6MyLLyp7YNJO/CZE9BuCgO9Kew!XHnIiUrIqk2R+BB+8ERmaw3RWvVLcSfbX8qgwS4anWWsD5zCZsepBEoIHX9ec1SpPl1USFRGE3M= X-Complaints-To: abuse@btinternet.com X-DMCA-Complaints-To: abuse@btinternet.com X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly X-Postfilter: 1.3.40 X-Original-Bytes: 1980 Xref: csiph.com comp.lang.java.programmer:20979 Patricia Shanahan wrote: > You would at least need to detect the escapes to get a usable error > message. Once you have done that, it is so easy to replace each escape > with the equivalent Unicode character that it is not worth doing > anything else. I'm not so sure about that. IIRC the rules about interpretting Unicode escapes have some seriously wierd convolutions. Something to do with protecting against multiply-encoded files, I think. It badly fails the Principle of Least WTF. It's in the spec, but I'm too lazy to go find the exact reference :-( -- chruis