Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.java.programmer > #17028
| From | markspace <-@.> |
|---|---|
| Newsgroups | comp.lang.java.programmer |
| Subject | Re: retriving escape unicode sequences from files ... |
| Date | 2012-08-02 21:00 -0700 |
| Organization | A noiseless patient Spider |
| Message-ID | <jvficj$3g5$1@dont-email.me> (permalink) |
| References | <jvfhtb$gh$1@speranza.aioe.org> |
On 8/2/2012 8:52 PM, qwertmonkey@syberianoutpost.ru wrote: > Why is it that if you save a unicode sequence in a file, say "français" > ~ > \u0066\u0072\u0061\u006e\u00e7\u0061\u0069\u0073 > ~ > and then retrieve as a String you can't then convert it back to a UTF-8 String Because it isn't French, it's just the ASCII characters \, u, 0, 0, 6, 6 etc. This is a totally different concept from the idea of escape sequences that the compiler interprets for you. If you want to read French out of a file, put *French* in the file, not ASCII. It can't work any other way. If you want to interpret ASCII as escape sequences, you'll have to write the interpreter. The Java Properties object reads escape sequences, but I don't think you can separate just the escape parser out.
Back to comp.lang.java.programmer | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
retriving escape unicode sequences from files ... qwertmonkey@syberianoutpost.ru - 2012-08-03 03:52 +0000
Re: retriving escape unicode sequences from files ... markspace <-@.> - 2012-08-02 21:00 -0700
Re: retriving escape unicode sequences from files ... Roedy Green <see_website@mindprod.com.invalid> - 2012-08-03 01:35 -0700
Re: retriving escape unicode sequences from files ... glen herrmannsfeldt <gah@ugcs.caltech.edu> - 2012-08-03 23:23 +0000
Re: retriving escape unicode sequences from files ... Arne Vajhøj <arne@vajhoej.dk> - 2012-08-03 20:37 -0400
Re: retriving escape unicode sequences from files ... Daniel Pitts <newsgroup.nospam@virtualinfinity.net> - 2012-08-03 20:49 -0700
Re: retriving escape unicode sequences from files ... markspace <-@.> - 2012-08-03 21:13 -0700
Re: retriving escape unicode sequences from files ... Lew <lewbloch@gmail.com> - 2012-08-03 23:45 -0700
Re: retriving escape unicode sequences from files ... Arne Vajhøj <arne@vajhoej.dk> - 2012-08-06 22:32 -0400
csiph-web