Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.java.programmer > #20315
| Path | csiph.com!usenet.pasdenom.info!gegeweb.org!eternal-september.org!feeder.eternal-september.org!mx04.eternal-september.org!.POSTED!not-for-mail |
|---|---|
| From | Knute Johnson <nospam@knutejohnson.com> |
| Newsgroups | comp.lang.java.programmer |
| Subject | Re: Unicode escapes and String literals? |
| Date | Thu, 13 Dec 2012 17:08:51 -0800 |
| Organization | A noiseless patient Spider |
| Lines | 39 |
| Message-ID | <kadu73$kn7$1@dont-email.me> (permalink) |
| References | <kad3d6$eoo$1@dont-email.me> <50ca6046$0$284$14726298@news.sunsite.dk> <kadqs2$3m9$1@dont-email.me> <50ca763e$0$287$14726298@news.sunsite.dk> |
| Mime-Version | 1.0 |
| Content-Type | text/plain; charset=ISO-8859-1; format=flowed |
| Content-Transfer-Encoding | 8bit |
| Injection-Date | Fri, 14 Dec 2012 01:08:52 +0000 (UTC) |
| Injection-Info | mx04.eternal-september.org; posting-host="9b3fcb0d22708969e4dc99e7aa0ef1f9"; logging-data="21223"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/qSnG6HlEyecxCz3MzMu1l" |
| User-Agent | Mozilla/5.0 (Windows NT 5.1; rv:17.0) Gecko/17.0 Thunderbird/17.0 |
| In-Reply-To | <50ca763e$0$287$14726298@news.sunsite.dk> |
| Cancel-Lock | sha1:EYFzJytVAgItvMfIagYEPCQWNzg= |
| Xref | csiph.com comp.lang.java.programmer:20315 |
Show key headers only | View raw
On 12/13/2012 4:43 PM, Arne Vajhøj wrote: > On 12/13/2012 7:11 PM, Knute Johnson wrote: >> On 12/13/2012 3:09 PM, Arne Vajhøj wrote: >>> On 12/13/2012 12:31 PM, Knute Johnson wrote: >>>> I just had a great revelation as I was putting together my SSCCE >>>> for the question I was going to ask. So it has changed my >>>> question. How do I do the conversion of unicode escape sequences >>>> to a String that are done by string literals? >>>> >>>> String s = "\u0066\u0065\u0064"; >>>> >>>> becomes "fed" but if you create a String with \u0066\u0065\u0064 in >>>> it without using the literal it stays \u0066\u0065\u0064. Is there >>>> a built in mechanism in Java for doing that translation to a >>>> String? >>> >>> I don't think there is anything built in. >>> >>> But it is trivial to code. >>> >>> This was posted just a few months back: > >> Well, brilliant minds think alike. Where were you when I asked the >> first time :-). I don't remember a thread on this going by but that's >> getting harder to do all the time. > > I am pretty sure that it was here that I posted the > code, but with the out commented implementation and > that someone (Daniel?) suggested the new implementation > as an improvement. > > Arne > Well I appreciate everybody's help. It was driving me nuts for two days. -- Knute Johnson
Back to comp.lang.java.programmer | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Unicode escapes and String literals? Knute Johnson <nospam@knutejohnson.com> - 2012-12-13 09:31 -0800
Re: Unicode escapes and String literals? Thomas Richter <thor@math.tu-berlin.de> - 2012-12-13 18:51 +0100
Re: Unicode escapes and String literals? Knute Johnson <nospam@knutejohnson.com> - 2012-12-13 10:47 -0800
Re: Unicode escapes and String literals? Lew <lewbloch@gmail.com> - 2012-12-13 11:41 -0800
Re: Unicode escapes and String literals? rossum <rossum48@coldmail.com> - 2012-12-14 13:32 +0000
Re: Unicode escapes and String literals? Lew <lewbloch@gmail.com> - 2012-12-14 15:16 -0800
Re: Unicode escapes and String literals? markspace <-@.> - 2012-12-13 12:58 -0800
Re: Unicode escapes and String literals? David Lamb <dalamb@cs.queensu.ca> - 2012-12-13 16:21 -0500
Re: Unicode escapes and String literals? markspace <-@.> - 2012-12-13 14:00 -0800
Re: Unicode escapes and String literals? David Lamb <dalamb@cs.queensu.ca> - 2012-12-13 17:17 -0500
Re: Unicode escapes and String literals? David Lamb <dalamb@cs.queensu.ca> - 2012-12-13 17:19 -0500
Re: Unicode escapes and String literals? Lew <lewbloch@gmail.com> - 2012-12-13 17:11 -0800
Re: Unicode escapes and String literals? Arne Vajhøj <arne@vajhoej.dk> - 2012-12-13 19:38 -0500
Re: Unicode escapes and String literals? Daniel Pitts <newsgroup.nospam@virtualinfinity.net> - 2012-12-13 11:46 -0800
Re: Unicode escapes and String literals? Daniel Pitts <newsgroup.nospam@virtualinfinity.net> - 2012-12-13 11:49 -0800
Re: Unicode escapes and String literals? Knute Johnson <nospam@knutejohnson.com> - 2012-12-13 14:55 -0800
Re: Unicode escapes and String literals? markspace <-@.> - 2012-12-13 15:32 -0800
Re: Unicode escapes and String literals? Arne Vajhøj <arne@vajhoej.dk> - 2012-12-13 18:09 -0500
Re: Unicode escapes and String literals? Daniel Pitts <newsgroup.nospam@virtualinfinity.net> - 2012-12-13 15:52 -0800
Re: Unicode escapes and String literals? Arne Vajhøj <arne@vajhoej.dk> - 2012-12-13 19:40 -0500
Re: Unicode escapes and String literals? Knute Johnson <nospam@knutejohnson.com> - 2012-12-13 16:11 -0800
Re: Unicode escapes and String literals? Arne Vajhøj <arne@vajhoej.dk> - 2012-12-13 19:43 -0500
Re: Unicode escapes and String literals? Knute Johnson <nospam@knutejohnson.com> - 2012-12-13 17:08 -0800
Re: Unicode escapes and String literals? Roedy Green <see_website@mindprod.com.invalid> - 2012-12-14 02:28 -0800
Re: Unicode escapes and String literals? Arne Vajhøj <arne@vajhoej.dk> - 2012-12-14 21:05 -0500
Re: Unicode escapes and String literals? Roedy Green <see_website@mindprod.com.invalid> - 2012-12-17 02:42 -0800
csiph-web