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

UNICODE in Java (Round 2)

P: n/a
Hello all.

First, a many thanks to all who helped out with my first issue with
getting UNICODE moving as it should in Java. I am now able to open the
file and store the strings as they appeared in Windows (using Cp1252)!
So, I'm a step closer!
But, I've run into another problem.

Once I have the string stored in my application, I try to load the
image it points to. If there are any UNICODE characters in the string,
then the image is not loaded correctly.

Here is my "store" line:
textures[i] = new String(bmpPath, 0, len, "Cp1252");

Then I attempt to open the image file:
RenderedImage img = (RenderedImage)JAI.create("fileload", filename);
RenderedImageAdapter ria = new RenderedImageAdapter(img);
BufferedImage buffer = ria.getAsBufferedImage();

'filename' is passed to the function with the contents of the
textures[] array. I am currently using Blackdown 1.4.1 for the above
code. I do have 1 straight ASCII image in my texture array, and it
loads fine -- it is just the images w/ UNICODE (Korean) that cause problems.

What can I do in the load sections to get these images to load
correctly? Thank you for any help!!
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.