Re: How to convert special characters into unicode?

2003-02-05 Thread Chris Jacobs

- Original Message - 
From: SRIDHARAN Aravind [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, February 05, 2003 8:27 AM
Subject: How to convert special characters into unicode?


 How to get unicode values for special characters in Java?
 I have a set of Czech special characters?
 
 For LATIN CAPITAL LETTER C WITH CARON, the unicode is 010c and 010d ( for both upper 
and lower cases).
 And I got this value from a PDF chart(u0100.odf) in www.unicode.org
 
 I have Czech special characters in an excel file.
 I copy them into Notepad.

Try copying to WordPad instead.

 I save them.

In WordPad you can save as unicode.

 Now I use native2ascii convertor that is available with JDK.

Why? You don't want to convert to ascii.

 After I run this utility, I am getting some other unicode values or sometimes only 
whitespaces come out.
 I don't know why?
 
 Please let me know how I convert special characters into unicode.
 Thank you.
 
 Aravind.
 





Re: How to convert special characters into unicode?

2003-02-05 Thread Doug Ewell
SRIDHARAN Aravind ASridharan at covansys dot com wrote:

 I have Czech special characters in an excel file.
 I copy them into Notepad.
 I save them.

 Now I use native2ascii convertor that is available with JDK.
 After I run this utility, I am getting some other unicode values or
 sometimes only whitespaces come out.
 I don't know why?

As Chris said, pasting them into Notepad is probably the trouble,
because U+010C and U+010D are not part of Windows code page 1252.  If
you are running Windows 2000 or XP, Notepad can save as Unicode, but you
must explicitly tell it to do so (the default is ANSI).  Better to use
a Unicode-capable editor such as WordPad, Word, or SC UniPad instead.
(Windows code pages 1250 and 1257 do support the two Czech characters.)

Since you already know the Unicode code points, it would have been
easier by now to type the escape sequences (Universal Character Names)
directly:

\u010c
\u010d

Alternatively, if you use SC UniPad, there is an option to convert
directly to UCN (as Adam mentioned), without having to bother with
native2ascii.

-Doug Ewell
 Fullerton, California





Re: How to convert special characters into unicode?

2003-02-05 Thread Chris Jacobs




You mean like this?
The following is two times the zodiac [ U+2648 ... U+2653 ]
Mortbats Zodiac:
1234567890-=
[ Needs Mortbats font to display, http://www.dingbatpages.com]
Unicode Zodiac:
♈♉♊♋♌♍♎♏♐♑♒♓
[ Needs e.g. Arial Unicode MS to 
display ]

The upper of these two zodiacs will give wrong unicode 
numbers, the lower will give the right numbers.

- Original Message - 
From: "SRIDHARAN Aravind" 
[EMAIL PROTECTED]
To: "Chris Jacobs" [EMAIL PROTECTED]
Sent: Thursday, February 06, 2003 4:57 
AM
Subject: RE: How to convert special 
characters into unicode?
Yes, I have Czech language by default in my 
windows 2000.But the thing is that when I convert it into unicode, it goes 
corrupt - in the sense- the unicode value gets corrupt.I don't know 
why?I believe Notepad just fools around me.It just make me believe my 
eyes that the value is the desired special character.Thank 
you.Aravind