By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,034 Members | 819 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,034 IT Pros & Developers. It's quick & easy.

JAI, Korean Text and Windows UNICODE

P: n/a
Hello all.

I'm still having some trouble with getting Java work its way through
Korean directories and filenames. I was able to load the strings in
properly (using Cp1252 as the charset), and can print them out to a
JTextArea as they appear in the Konqueror (KDE) browser.
When working in Linux, the images still fail to load properly when I
attempt to do so with JAI. Is there something special I need to do with
JAI in order for it to recognize an alternate charset? I only have
problems when working with strings w/ Korean text in them -- if the
string has no Korean UNICODE, the image loads fine.
Below is the code I am using to load the images:

private Appearance createAppearance(String filename) {
Appearance appear = new Appearance();

RenderedImage img;

BufferedImage buffer = null;
try {
img = (RenderedImage)JAI.create("fileload", filename);
RenderedImageAdapter ria = new RenderedImageAdapter(img);
buffer = ria.getAsBufferedImage();

TextureLoader loader = new TextureLoader(buffer, Texture.RGB);
Texture2D texture = (Texture2D)loader.getTexture();

texture.setEnable(true);
texture.setMagFilter(Texture.NICEST);

appear.setTexture(texture);
} catch (IllegalArgumentException e) {
System.err.println("Failed to load texture: " + filename);
}

return appear;
}

I am currently using JDK 1.4.1 (Blackdown), so I need JAI to do this.
I haven't gotten JDK 1.5.0 to install correctly on Gentoo Linux, so I
can't test that out yet, since the images I am working with are BMPs.

Thanks for any help! It is much appreciated!
Jul 17 '05 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.