Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.java.gui > #3495
| From | "Dave Miller" <dave.miller@THRWHITE.remove-dii-this> |
|---|---|
| Subject | Re: Can't display UTF-8 e |
| Message-ID | <0YCWj.15051$6D1.2691@trndny02> (permalink) |
| Newsgroups | comp.lang.java.gui |
| References | <e3b76de2-d1bd-4cf0-a2a0-3c5e8a5c43d7@l42g2000hsc.googlegroups.com> |
| Date | 2011-04-27 15:45 +0000 |
| Organization | TDS.net |
To: comp.lang.java.gui
jgricourt@free.fr wrote:
> Hello,
>
> I am trying to display unicode text in a JLabel, unfortunately the
> snippet code right below will fail ... (the JLabel displays it as
> ISO-8859-1).
>
> new JLabel(new String("ooooo".getBytes("UTF-8")))
>
> Any idea / suggestions ?
>
> Thanks
>
> Jitou
Break the operation into single steps then put it back together - your
new String is taking the UTF-8 byte array and converting it back into
the default charset.
--
Dave Miller
Java Web Hosting at:
http://www.cheap-jsp-hosting.com/
---
* Synchronet * The Whitehouse BBS --- whitehouse.hulds.com --- check it out free usenet!
--- Synchronet 3.15a-Win32 NewsLink 1.92
Time Warp of the Future BBS - telnet://time.synchro.net:24
Back to comp.lang.java.gui | Previous | Next | Find similar | Unroll thread
Re: Can't display UTF-8 e "Dave Miller" <dave.miller@THRWHITE.remove-dii-this> - 2011-04-27 15:45 +0000
csiph-web