UNICODE in Java (Round 2)

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Nicholas Pappas

    UNICODE in Java (Round 2)

    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("fil eload", filename);
    RenderedImageAd apter ria = new RenderedImageAd apter(img);
    BufferedImage buffer = ria.getAsBuffer edImage();

    '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!!
Working...