UNICODE in Java (Round 2)
From: Nicholas Pappas (noreply_at_rightstep.org)
Date: 05/30/04
- Next message: Leo Wong: "OT: Speaking in Tongues"
- Previous message: Andrew Thompson: "Re: question on multidimensional array"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Sun, 30 May 2004 13:35:58 GMT
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!!
- Next message: Leo Wong: "OT: Speaking in Tongues"
- Previous message: Andrew Thompson: "Re: question on multidimensional array"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|