473,386 Members | 1,823 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.

Checking, if a language is available

Nepomuk
3,112 Expert 2GB
Hi!
I was thinking, when Java has some Unicode characters which should be displayed, it might not know these characters (e.g. japanese symbols). Is there any way to check that while runtime? At the moment, it's just displaying annoying squares and having an entry like
._.._._
|_||_||_|
isn't that thrilling.

Greetings,
Nepomuk
Sep 10 '07 #1
2 1131
JosAH
11,448 Expert 8TB
Hi!
I was thinking, when Java has some Unicode characters which should be displayed, it might not know these characters (e.g. japanese symbols). Is there any way to check that while runtime? At the moment, it's just displaying annoying squares and having an entry like
._.._._
|_||_||_|
isn't that thrilling.

Greetings,
Nepomuk
There's the Font.canDisplayUpTo(String) method but it's cumbersome: you
have to check your entire text against all the available fonts. If a font can display
the entire text you can use that font for your JTextArea whatever.

I simply have a GUI available that allows the user to select a font (using trial and
error, but so be it ;-)

kind regards,

Jos
Sep 10 '07 #2
Nepomuk
3,112 Expert 2GB
There's the Font.canDisplayUpTo(String) method but it's cumbersome: you
have to check your entire text against all the available fonts. If a font can display
the entire text you can use that font for your JTextArea whatever.

I simply have a GUI available that allows the user to select a font (using trial and
error, but so be it ;-)

kind regards,

Jos
Hm, in my case it's not that much work - basically I want to know, if the System can display Japanese, Korean or Chinese symbols with the Font that it's already using, so no need for a GUI. ^^ I've got it working now. Thanks a lot!

Greetings,
Nepomuk
Sep 10 '07 #3

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

Similar topics

23
by: sashan | last post by:
I'm a Python newbie. I have been using c++ for 5 years and before that I was programming in Pascal. The one thing that annoys me about python is dynamic typing because I find myself making...
5
by: Tongu? Yumruk | last post by:
I have a little proposal about type checking in python. I'll be glad if you read and comment on it. Sorry for my bad english (I'm not a native English speaker) A Little Stricter Typing in Python...
6
by: Web Developer | last post by:
Hi, I come across the term "type checking" very often in my readings on C++, and have never heard it in Java. Besides the simplistic answer that it checks the "type", what more does it mean? ...
67
by: Steven T. Hatton | last post by:
Some people have suggested the desire for code completion and refined edit-time error detection are an indication of incompetence on the part of the programmer who wants such features. ...
16
by: lawrence k | last post by:
I've made it habit to check all returns in my code, and usually, on most projects, I'll have an error function that reports error messages to some central location. I recently worked on a project...
42
by: =?Utf-8?B?UGxheWE=?= | last post by:
I have an if statement that isn't working correctly and I was wondering how I check for a blank string. My Code Example if me.fieldname(arrayIndex) = "" then ----- end if When I do this and...
125
by: jacob navia | last post by:
We hear very often in this discussion group that bounds checking, or safety tests are too expensive to be used in C. Several researchers of UCSD have published an interesting paper about this...
27
by: Aaron Hsu | last post by:
Hey all, After seeing the Secure version I/O functions thread, it occured to me that maybe not everyone agrees with the almost universal adage that I have heard. I have Always been told that...
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: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
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.