JAI, Korean Text and Windows UNICODE

N

Nicholas Pappas

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!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,537
Members
45,021
Latest member
AkilahJaim

Latest Threads

Top