Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.java.programmer > #26193
| From | Roedy Green <see_website@mindprod.com.invalid> |
|---|---|
| Newsgroups | comp.lang.java.programmer |
| Subject | Re: replace extended characters |
| Date | 2011-02-11 16:55 -0800 |
| Organization | Canadian Mind Products |
| Message-ID | <nmlbl6h1gniibgj4nb67mpo5bfubtu5n3h@4ax.com> (permalink) |
| References | <15bd3363-c781-487b-98d5-2243eff7cc8f@24g2000yqa.googlegroups.com> <ij1v7l$jel$1@news.albasani.net> |
On Thu, 10 Feb 2011 19:18:36 -0500, Lew <noone@lewscanon.com> wrote, quoted or indirectly quoted someone who said : >If you are certain that the set of possible input characters is small, and >those you wish to substitute even smaller, you can use a lookup table. Use a >'Map<Character,Character>' (will choke on supplementary code points) for >those, and only those, you wish to substitute. If the key is absent, pass the >source character through unchanged. If present, replace with the associated >value. If you are just handling 256 or 4906 possible chars, then an ordinary array will be both easy to code and very fast. The highest named entity is 9830 ♦ 0x2666 black diamond suit. There are 2^16 = 65536 possible 16-bit unicode chars. Which chars do you transform? -- Roedy Green Canadian Mind Products http://mindprod.com Refactor early. If you procrastinate, you will have even more code to adjust based on the faulty design. .
Back to comp.lang.java.programmer | Previous | Next — Previous in thread | Next in thread | Find similar
replace extended characters VIDEO MAN <bigmush7@googlemail.com> - 2011-02-10 15:33 -0800
Re: replace extended characters RedGrittyBrick <RedGrittyBrick@spamweary.invalid> - 2011-02-11 15:31 +0000
Re: replace extended characters Arved Sandstrom <asandstrom3minus1@eastlink.ca> - 2011-02-10 21:27 -0400
Re: replace extended characters Arne Vajhøj <arne@vajhoej.dk> - 2011-02-10 21:42 -0500
Re: replace extended characters Lawrence D'Oliveiro <ldo@geek-central.gen.new_zealand> - 2011-02-11 15:35 +1300
Re: replace extended characters Lew <noone@lewscanon.com> - 2011-02-10 21:29 -0500
Re: replace extended characters Joshua Cranmer <Pidgeot18@verizon.invalid> - 2011-02-11 18:40 -0500
Re: replace extended characters Roedy Green <see_website@mindprod.com.invalid> - 2011-02-11 16:57 -0800
Re: replace extended characters v_borchert@despammed.com (Volker Borchert) - 2011-02-12 05:58 +0000
Re: replace extended characters Arne Vajhøj <arne@vajhoej.dk> - 2011-02-10 21:52 -0500
Re: replace extended characters Joshua Cranmer <Pidgeot18@verizon.invalid> - 2011-02-10 19:37 -0500
Re: replace extended characters Lew <noone@lewscanon.com> - 2011-02-10 19:18 -0500
Re: replace extended characters Roedy Green <see_website@mindprod.com.invalid> - 2011-02-11 16:55 -0800
Re: replace extended characters Owen Jacobson <angrybaldguy@gmail.com> - 2011-02-11 22:15 -0500
Re: replace extended characters Roedy Green <see_website@mindprod.com.invalid> - 2011-02-11 15:07 -0800
Re: replace extended characters Roedy Green <see_website@mindprod.com.invalid> - 2011-02-11 15:11 -0800
csiph-web