Java Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 
Go Back   Dev Articles Community ForumsProgrammingJava Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
  #1  
Old April 22nd, 2005, 07:51 AM
kpsiddharth kpsiddharth is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Apr 2005
Posts: 7 kpsiddharth User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 3 h 12 m 57 sec
Reputation Power: 0
Question displaying unicode characters

hi -

i wanted to display hindi characters in a java 2 program. normally i use edit command in dos to make my programs. iam using windows xp. i installed the regional support for indic languages but could not right in the dos editor in unicode. so i wrote the program in notepad and saved it as Unicode encoding scheme. later i used the following command to compile the program:

javac -encoding UTF-16 txtHindi.java
java txtHindi

however the output showed

???

it showed the same output when i saved the file in notepad as UTF-8 encoding.

can anyone please help as to how can i display hindi/unicode charcaters in a java program?

and also whether is it necessary to use swing or something else to be able to display it correctly?

regards.
siddhartha

Reply With Quote
  #2  
Old April 22nd, 2005, 10:12 AM
MadCowDzz's Avatar
MadCowDzz MadCowDzz is offline
I'm Internet Famous
Dev Articles Frequenter (2500 - 2999 posts)
 
Join Date: Jan 2003
Location: Toronto, Canada
Posts: 2,890 MadCowDzz User rank is Lance Corporal (50 - 100 Reputation Level)MadCowDzz User rank is Lance Corporal (50 - 100 Reputation Level)MadCowDzz User rank is Lance Corporal (50 - 100 Reputation Level) 
Time spent in forums: 1 Week 16 h 14 m 9 sec
Reputation Power: 8
I'm curious, what does your Java code look like?
Does the DOS command line support unicode characters?

I know in HTML, when I use a special character that the font does not support it, it replaces it with a question mark.

Reply With Quote
  #3  
Old April 24th, 2005, 03:20 AM
kpsiddharth kpsiddharth is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Apr 2005
Posts: 7 kpsiddharth User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 3 h 12 m 57 sec
Reputation Power: 0
Arrow

I think the dos command line does not. so it was showing the questionmarks. the code was ordinary - i was just trying to display hindi text using System.out.println(). the argument was in hindi and i saved the file in notepad using UTF-8 and Unicode encoding schemes respectively and tried both of them out.

later i learnt dos commmand line did not support it. instead i used swing which allows labels etc to display unicode characters. could you tell me if i can use unicode characters in RDF and HTML? i think it should be possible in HTML because there are pages in native languages. could you tell me about RDF pages?

regards.

siddharth





Quote:
Originally Posted by MadCowDzz
I'm curious, what does your Java code look like?
Does the DOS command line support unicode characters?

I know in HTML, when I use a special character that the font does not support it, it replaces it with a question mark.

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsProgrammingJava Development > displaying unicode characters


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 4 hosted by Hostway
Stay green...Green IT