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


Groups > comp.lang.java.programmer > #16230

Re: problem with java displaying unicode, under ms-windows

From Lew <noone@lewscanon.com>
Newsgroups comp.lang.java.programmer
Subject Re: problem with java displaying unicode, under ms-windows
Date 2012-07-22 13:15 -0700
Organization albasani.net
Message-ID <juhn1d$27a$1@news.albasani.net> (permalink)
References <096d855d-7df4-4591-a498-818ae0bb193c@googlegroups.com> <jug7ni$5qk$1@news.albasani.net> <6c69ad6f-04d7-4992-bfeb-ea8ebe5bbe97@googlegroups.com>

Show all headers | View raw


Philip Brown wrote:
> Lew wrote:
>> Philip Brown wrote:
>> I'm hoping someone can tell me the magic to get java [sic] (6 or 7) to display unicode [sic] chars under ms-windows [sic]?
>>
>> This is really an OS question.
>>
>> Java will emit characters using the target OS&#39;s encoding by default.
>>
>> The fact is that Java is already displaying Unicode characters. However it is
>> Windows that is failing to render them.
>>
>> Do you set the encoding explicitly in your program.
>
> I think I did.

Then show us the line of code where you did.

You don't need to guess. Look at the code. You either will see an encoding 
specified or you won't.

> If I didnt, wouldnt it fail under macos [sic]?

Not if the default encoding of the platform and available fonts just 
coincidentally happen to be what you want.

> It works under macos [sic], as I said.

Yes, and that's not relevant.

> Similarly, if I failed to set the encoding properly... wouldnt it just display gibberish chars?

No. It will either display the characters that correspond according to its own 
encoding, or the placeholder for characters that it doesn't recognize or for 
which it doesn't have an appropriate font.

And what do you mean by "gibberish"?

> Instead, its displaying the old empty square "no font mapping for this char" glyph.

Eh, so absent your answer about what encoding you specified, I can only guess 
that either the Windows encoding doesn't give you what you want, which 
historically has been an issue with Windows but I don't know about your 
version, or you don't have the fonts you need.

Since you won't confirm your encoding choices, or even show the code you 
vaguely describe with respect to the fonts you select, it's a little difficult 
to take the answer any further.

> Similarly.. when it attempts to display a char, it is displaying ONE empty-square.
> If the encoding was not set, it would display two empty chars, since it's displaying a 2-byte "widechar"

Maybe. Maybe not. It depends on what the default platform encoding is.

> Not to mention that the same program has worked under earlier versions of windows and jre.
> (And by "same program", I mean *same* program)

OK, whatever.

-- 
Lew
Honi soit qui mal y pense.
http://upload.wikimedia.org/wikipedia/commons/c/cf/Friz.jpg

Back to comp.lang.java.programmer | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

problem with java displaying unicode, under ms-windows phil@bolthole.com - 2012-07-21 22:31 -0700
  Re: problem with java displaying unicode, under ms-windows Lew <noone@lewscanon.com> - 2012-07-21 23:48 -0700
    Re: problem with java displaying unicode, under ms-windows Philip Brown <phil@bolthole.com> - 2012-07-22 05:00 -0700
      Re: problem with java displaying unicode, under ms-windows Lew <noone@lewscanon.com> - 2012-07-22 13:15 -0700
  Re: problem with java displaying unicode, under ms-windows rossum <rossum48@coldmail.com> - 2012-07-22 12:53 +0100
    Re: problem with java displaying unicode, under ms-windows Philip Brown <phil@bolthole.com> - 2012-07-22 05:47 -0700
      Re: problem with java displaying unicode, under ms-windows markspace <-@.> - 2012-07-22 08:46 -0700
  Re: problem with java displaying unicode, under ms-windows Knute Johnson <nospam@rabbitbrush.frazmtn.com> - 2012-07-22 09:22 -0700
    Re: problem with java displaying unicode, under ms-windows Philip Brown <phil@bolthole.com> - 2012-07-22 09:55 -0700
      Re: problem with java displaying unicode, under ms-windows markspace <-@.> - 2012-07-22 10:10 -0700
        Re: problem with java displaying unicode, under ms-windows Philip Brown <phil@bolthole.com> - 2012-07-22 10:37 -0700
          Re: problem with java displaying unicode, under ms-windows markspace <-@.> - 2012-07-22 11:31 -0700
            Re: problem with java displaying unicode, under ms-windows Philip Brown <phil@bolthole.com> - 2012-07-22 11:40 -0700
          Re: problem with java displaying unicode, under ms-windows markspace <-@.> - 2012-07-22 11:47 -0700
          Re: problem with java displaying unicode, under ms-windows Philip Brown <phil@bolthole.com> - 2012-07-22 12:09 -0700

csiph-web