473,387 Members | 2,436 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,387 software developers and data experts.

How to find if a locale is supported by given encoding?

Hi,

I have a need to show list of locales into a field on a wizard ( a Java based application). But these locales should be such that they are supported by the current character set (encoding) selected by the user on his machine. Is there any Java utility function or set of function or package, using which, I can somehow figure out my current character set / encoding would support the given locale?



Thanks,

~jaideep
Aug 21 '09 #1
2 3041
JosAH
11,448 Expert 8TB
@jaibarde
The coupling between fonts, locales and encodings is very weak, e.g. you can write Croatian using a Japanese character set or write Russian using an ordinary ASCII character set. Your best bet are the Font.canDisplay( ... ) and Font.canDisplayUpTo( ... ) methods; read their API documentation.

kind regards,

Jos
Aug 21 '09 #2
Thanks Jos,
I'll go through the documentation and get back to you in case of more doubts.
~jaideep
Aug 21 '09 #3

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

Similar topics

9
by: Nuff Said | last post by:
When I type the following code in the interactive python shell, I get 'UTF-8'; but if I put the code into a Python script and run the script - in the same terminal on my Linux box in which I...
4
by: Timothy Smith | last post by:
i'm trying to setlocale() on 4.10, and it appears the python package doesn't support this under 4.10. Python 2.3.3 (#2, Apr 28 2004, 22:48:37) ] on freebsd4 Type "help", "copyright", "credits"...
22
by: Keith MacDonald | last post by:
Hello, Is there a portable (at least for VC.Net and g++) method to convert text between wchar_t and char, using the standard library? I may have missed something obvious, but the section on...
1
by: Cagdas Ozgenc | last post by:
Greetings. I am confused about C++ standard library locale stuff. It seems as if the implementations of locales are not part of the library, but only some guideline classes are there. What is...
0
by: R | last post by:
Hi all, I have a simple question about locale and PHP5. I'm using polish characters but I encode them in UTF-8. I was sorting an array with usort($array, 'strcoll'); but I've entred a...
7
by: Ralf Goertz | last post by:
Hi, since my previous post <455440ad$0$30326$9b4e6d93@newsspool1.arcor-online.netis still unanswered I'd like to rephrase my question. In order to read/write a wstring in UTF-8 encoding it is...
0
by: Tom Chilton | last post by:
Hi, I am running Gentoo Linux. I have emerge'd Bibus and everything seemed to go well. When I try to start it from a shell I get: tom@linuxbox ~ $ bibus Traceback (most recent call last):...
24
by: Donn Ingle | last post by:
Hello, I hope someone can illuminate this situation for me. Here's the nutshell: 1. On start I call locale.setlocale(locale.LC_ALL,''), the getlocale. 2. If this returns "C" or anything...
2
by: Giovanni Bajo | last post by:
Hello, I am trying to find a good way to portably get the output of strftime() and put it onto a dialog (I'm using PyQt, but it doesn't really matter). The problem is that I need to decode the...
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: 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:
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
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
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.