Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > Unicode >16 Bit JTextPane etc..

Reply
Thread Tools

Unicode >16 Bit JTextPane etc..

 
 
Jan Burse
Guest
Posts: n/a
 
      06-08-2013
Dear All,

I tried a couple of fonts, but none of
these fonts were able to display the
Unicode 120000 (decimal).

I supplied the two surrogate pairs
D835 and DCC0. The JTextPane etc.. show
a single box, so that I assume the
code point is recognized.

What is wrong?

Bye

P.S.: My browser (mozilla) easily
shows the Mathematical Script Small K
which corresponds to the code point.

 
Reply With Quote
 
 
 
 
Jeff Higgins
Guest
Posts: n/a
 
      06-08-2013
On 06/08/2013 07:42 AM, Jan Burse wrote:
> Jan Burse schrieb:
>> I supplied the two surrogate pairs
>> D835 and DCC0. The JTextPane etc.. show
>> a single box, so that I assume the
>> code point is recognized.

>
> The white box is shown on Windows. On the
> Mac some chinese or so is shown. But both
> don't show Mathematical Script Small K.
>

What's a 16 bit JTextPane?
If you'll give a small demo code I'll try it
on Debian Squeeze and Windows 7,8, several JDK versions available.
Mathematical Script Small K shows up in gedit and a Mozilla browser here.
 
Reply With Quote
 
 
 
 
Joerg Meier
Guest
Posts: n/a
 
      06-08-2013
On Sat, 08 Jun 2013 10:31:27 -0400, Jeff Higgins wrote:

> What's a 16 bit JTextPane?


I believe the topic is to be read as "a unicode symbol above 16 bit in a
regular JTextPane".

Liebe Gruesse,
Joerg

--
Ich lese meine Emails nicht, replies to Email bleiben also leider
ungelesen.
 
Reply With Quote
 
Jan Burse
Guest
Posts: n/a
 
      06-08-2013
Jeff Higgins schrieb:
> On 06/08/2013 07:42 AM, Jan Burse wrote:
>> Jan Burse schrieb:
>>> I supplied the two surrogate pairs
>>> D835 and DCC0. The JTextPane etc.. show
>>> a single box, so that I assume the
>>> code point is recognized.

>>
>> The white box is shown on Windows. On the
>> Mac some chinese or so is shown. But both
>> don't show Mathematical Script Small K.
>>

> What's a 16 bit JTextPane?
> If you'll give a small demo code I'll try it
> on Debian Squeeze and Windows 7,8, several JDK versions available.
> Mathematical Script Small K shows up in gedit and a Mozilla browser here.


[...]
JTextPane t = new JTextPane();
t.setText("\uD835\uDCC0");
[...]
 
Reply With Quote
 
Jeff Higgins
Guest
Posts: n/a
 
      06-08-2013
On 06/08/2013 02:35 PM, Joerg Meier wrote:
> On Sat, 08 Jun 2013 10:31:27 -0400, Jeff Higgins wrote:
>
>> What's a 16 bit JTextPane?

>
> I believe the topic is to be read as "a unicode symbol above 16 bit in a
> regular JTextPane".
>


Ah. That makes sense.
Thanks.

 
Reply With Quote
 
Jeff Higgins
Guest
Posts: n/a
 
      06-08-2013
On 06/08/2013 06:15 PM, Jan Burse wrote:
> Jeff Higgins schrieb:
>> On 06/08/2013 07:42 AM, Jan Burse wrote:
>>> Jan Burse schrieb:
>>>> I supplied the two surrogate pairs
>>>> D835 and DCC0. The JTextPane etc.. show
>>>> a single box, so that I assume the
>>>> code point is recognized.
>>>
>>> The white box is shown on Windows. On the
>>> Mac some chinese or so is shown. But both
>>> don't show Mathematical Script Small K.
>>>

>> What's a 16 bit JTextPane?
>> If you'll give a small demo code I'll try it
>> on Debian Squeeze and Windows 7,8, several JDK versions available.
>> Mathematical Script Small K shows up in gedit and a Mozilla browser here.

>
> [...]
> JTextPane t = new JTextPane();
> t.setText("\uD835\uDCC0");
> [...]

Sorry, too much trouble for me to wrap into compilable block.
 
Reply With Quote
 
Jan Burse
Guest
Posts: n/a
 
      06-08-2013
Jeff Higgins schrieb:
>> [...]
>> JTextPane t = new JTextPane();
>> t.setText("\uD835\uDCC0");
>> [...]

> Sorry, too much trouble for me to wrap into compilable block.


http://docs.oracle.com/javase/tutori...mplerDemo.java

 
Reply With Quote
 
Jeff Higgins
Guest
Posts: n/a
 
      06-09-2013
On 06/08/2013 06:25 PM, Jan Burse wrote:
> Jeff Higgins schrieb:
>>> [...]
>>> JTextPane t = new JTextPane();
>>> t.setText("\uD835\uDCC0");
>>> [...]

>> Sorry, too much trouble for me to wrap into compilable block.

>
> http://docs.oracle.com/javase/tutori...mplerDemo.java
>
>


Wow! Really?

import javax.swing.*;

public class SmallDemo {

private JFrame frame = new JFrame("A Small Demo");
private JTextPane textpane = new JTextPane();

public SmallDemo() {
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOS E);
textpane.setText("\uD835\uDCC0");
frame.add(textpane);
frame.pack();
frame.setVisible(true);
}

public static void main(String[] args) {
SwingUtilities.invokeLater(new Runnable() {

@Override
public void run() {
SmallDemo demo = new SmallDemo();
}
});
}
}

Works here. You're welcome.

 
Reply With Quote
 
Jeff Higgins
Guest
Posts: n/a
 
      06-09-2013
On 06/08/2013 09:50 PM, Martin Gregorie wrote:
> On Sun, 09 Jun 2013 11:42:23 +1000, Qu0ll wrote:
>
>> "Jeff Higgins" wrote in message news:kp0j0h$k1f$(E-Mail Removed)...
>>
>>> Works here. You're welcome.

>>
>> Not here. Same result as OP.
>>
>> Windows 7 64-bit with Java 7 Update 21 64-bit.

>
> Same here [little white square] running (Fedora 18 fully patched on
> Friday, PAE kernel, Java 1.6.0_45).
>
>

Hmm. Shrugs. Java 1.7.0_21, Debian 6.0.7 works here [Mathematical Script
Small K].
 
Reply With Quote
 
Sven Köhler
Guest
Posts: n/a
 
      06-09-2013
Am 08.06.2013 14:29, schrieb Jan Burse:
> P.S.: My browser (mozilla) easily
> shows the Mathematical Script Small K
> which corresponds to the code point.


So did you make sure that JTextPane and your Browser use the same font?
Did you try copy/pasting from your Browser to the JTextPane or the other
way round?


Regards,
Sven
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
What is the point of having 16 bit colour if a computer monitor can only display 8 bit colour? How do you edit 16 bit colour when you can only see 8 bit? Scotius Digital Photography 6 07-13-2010 03:33 AM
Re: PIL (etc etc etc) on OS X Kevin Walzer Python 4 08-13-2008 08:27 AM
JTextPane, JEditorPane, copy & paste etc. wizofaus@hotmail.com Java 1 02-23-2006 04:25 AM
64 bit - Windows Liberty 64bit, Windows Limited Edition 64 Bit, Microsoft SQL Server 2000 Developer Edition 64 Bit, IBM DB2 64 bit - new ! vvcd Computer Support 0 09-17-2004 08:15 PM
64 bit - Windows Liberty 64bit, Windows Limited Edition 64 Bit,Microsoft SQL Server 2000 Developer Edition 64 Bit, IBM DB2 64 bit - new! Ionizer Computer Support 1 01-01-2004 07:27 PM



Advertisments