Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.java.gui > #3495 > unrolled thread

Re: Can't display UTF-8 e

Started by"Dave Miller" <dave.miller@THRWHITE.remove-dii-this>
First post2011-04-27 15:45 +0000
Last post2011-04-27 15:45 +0000
Articles 1 — 1 participant

Back to article view | Back to comp.lang.java.gui

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: Can't display UTF-8 e "Dave Miller" <dave.miller@THRWHITE.remove-dii-this> - 2011-04-27 15:45 +0000

#3495 — Re: Can't display UTF-8 e

From"Dave Miller" <dave.miller@THRWHITE.remove-dii-this>
Date2011-04-27 15:45 +0000
SubjectRe: Can't display UTF-8 e
Message-ID<0YCWj.15051$6D1.2691@trndny02>
  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

[toc] | [standalone]


Back to top | Article view | comp.lang.java.gui


csiph-web