Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!news.glorb.com!news-out.readnews.com!transit4.readnews.com!news-out.news.tds.net!newsreading01.news.tds.net!53ab2750!not-for-mail From: "Roedy Green" Subject: Re: retriving escape unicode sequences from files ... Message-ID: <501C1569.56047.calajapr@time.synchro.net> X-Comment-To: qwertmonkey Newsgroups: comp.lang.java.programmer In-Reply-To: <501C1568.56042.calajapr@time.synchro.net> References: <501C1568.56042.calajapr@time.synchro.net> X-FTN-AREA: COMP.LANG.JAVA.PROGRAMMER X-FTN-MSGID: 1:261/38 91e023f0 X-FTN-REPLY: 1:261/38 276ab5eb Content-Type: text/plain; charset=IBM437 Content-Transfer-Encoding: 8bit X-Gateway: time.synchro.net [Synchronet 3.16a-Win32 NewsLink 1.98] Lines: 32 Date: Fri, 03 Aug 2012 18:54:21 GMT NNTP-Posting-Host: 69.21.70.65 X-Complaints-To: news@tds.net X-Trace: newsreading01.news.tds.net 1344020061 69.21.70.65 (Fri, 03 Aug 2012 13:54:21 CDT) NNTP-Posting-Date: Fri, 03 Aug 2012 13:54:21 CDT Organization: tds.net Xref: csiph.com comp.lang.java.programmer:17088 To: qwertmonkey From: Roedy Green On Fri, 3 Aug 2012 03:52:12 +0000 (UTC), qwertmonkey@syberianoutpost.ru wrote, quoted or indirectly quoted someone who said : > Why is it that if you save a unicode sequence in a file, say "frantais" This is a bit of a simplification. You need to understand encoding, which kicks in when you use a Reader or Writer. Otherwise you are dealing with raw bytes and InputStreams and OutputStreams. Encoding takes your 16-bit internal Unicode chars and converts it back and forth to UTF-8 bytes. see http://mindprod.com/applet/fileio.html for sample code see http://mindprod.com/jgloss/encoding.html for an explanation of encoding and the various types of encoding. -- Roedy Green Canadian Mind Products http://mindprod.com The greatest shortcoming of the human race is our inability to understand the exponential function. ~ Dr. Albert A. Bartlett (born: 1923-03-21 age: 89) http://www.youtube.com/watch?v=F-QA2rkpBSY --- BBBS/Li6 v4.10 Dada-1 * Origin: Prism bbs (1:261/38) --- Synchronet 3.16a-Win32 NewsLink 1.98 Time Warp of the Future BBS - telnet://time.synchro.net:24