473,386 Members | 1,819 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

java.awt components not able to display some non-english

Hi All,

While we are Localizing our product we faced below problem:

java.awt components not able to display some non-english
charecters like \u2019 , \u2018 , \u2026 , \u2013 , \u8230 .

java.awt components used in our application-
1. java.awt.Choice
2.java.awt.TextField
3.java.awt.List
4.java.awt.Label

Work around:

- We tried by chaning the System Locale to chinese, then it start
diplaying properly which is not feasible solution.

NOTE:
1. Please run TestUnicode.java for how java.awt components displays
garbage values in java.awt.Choice,java.awt.TextField.

2. please run unicode.html for actual chars to be displayed.
code:

/* TestUnicode.java */

import java.awt.*;
import java.applet.*;


public class TestUnicode {

public static void main(String[] args) {

Frame f = new Frame();
Choice ch = new Choice();
f.setLayout(new FlowLayout());
ch.addItem("\u2019 = \\u2019");
ch.addItem("\u2018 = \\u2018");
ch.addItem("\u2026 = \\u2026");
ch.addItem("\u2013 = \\u2013");
ch.addItem("\u8230 = \\u8230");
TextField e = new TextField("\u2019 = \\u2019 \u2018 = \\u2018 \u2026 = \\u2026 \u2013 = \\u2013 \u8230 = \\u8230");
f.add(e);
f.add(ch);
f.pack();
f.show();
}
}


/* unicode.html */

<script

document.write("\u2019 = \\u2019 \u2018 = \\u2018 \u2026 = \\u2026
\u2013 = \\u2013 \u8230 = \\u8230"); </script>

Please let me know your comments regarding the issue .


Thanks in Advance.

Regards,
Vidhya.
Apr 5 '07 #1
0 1280

Sign in to post your reply or Sign up for a free account.

Similar topics

5
by: apchar | last post by:
I am trying to use php as a kind of servlet to act as a middle man between a java applet and mysql. I know java has jdbc but it's flakey and painful. php access to mysql is much nicer. So I have:...
47
by: Theatre Mgmt | last post by:
Sun project seeks to solve Java memory, execution issues http://story.news.yahoo.com/news?tmpl=story&u=/infoworld/20050325/tc_infoworld/58059&e=1&ncid= San Francisco (InfoWorld) - Sun...
2
by: Efkas | last post by:
Hi I am a new c# programmer since my project let java on the tablet to do programming on windows. I was building an application all customized. I had : 1. my own custom widgets (text areas,...
1
by: David Van D | last post by:
Hi there, A few weeks until I begin my journey towards a degree in Computer Science at Canterbury University in New Zealand, Anyway the course tutors are going to be teaching us JAVA wth bluej...
2
by: Jobs | last post by:
Download the JAVA , .NET and SQL Server interview with answers Download the JAVA , .NET and SQL Server interview sheet and rate yourself. This will help you judge yourself are you really worth of...
5
by: wshaer | last post by:
Hi This is the task: and these are my classes: public class Engine{ // Declare the varibles
8
by: Gabriele | last post by:
I'm studying differences between those two architecture in order to choose a setup to develop a completely new application. I'm a programmer with some experience on C++ and PHP and i have basic...
1
by: rainman33 | last post by:
I am getting this error message in the program I'm working on (line 150), and am wondering what it means? This is an exercise for a college class; just want to declare that; this is not my own work....
5
by: r035198x | last post by:
Setting up. Getting started To get started with java, one must download and install a version of Sun's JDK (Java Development Kit). The newest release at the time of writting this article is...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.