JAI, Korean Text and Windows UNICODE

From: Nicholas Pappas (noreply_at_rightstep.org)
Date: 05/31/04


Date: Mon, 31 May 2004 15:48:09 GMT


        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!



Relevant Pages

  • JAI, Korean Text and Windows UNICODE
    ... Korean directories and filenames. ... I was able to load the strings in ... JAI in order for it to recognize an alternate charset? ... problems when working with strings w/ Korean text in them -- if the ...
    (comp.lang.java.programmer)
  • JAI, Korean Text and Windows UNICODE
    ... Korean directories and filenames. ... I was able to load the strings in ... JAI in order for it to recognize an alternate charset? ... problems when working with strings w/ Korean text in them -- if the ...
    (comp.lang.java)
  • potential changes to Locale-PO
    ... the patches to the maintainer Alan Schwartz. ... Documented quoting and newlines in strings passed to/from methods. ... PO files normally declare their charset. ... strings converted to Perl's internal Unicode representation. ...
    (comp.lang.perl.modules)
  • Re: How to load desired part of ASCII file into tstringlist ?
    ... >I have pretty large ASCII file from which I need to load only desired ... > Would be great if Delphi can do something like stringlist.loadfromfile ... discard 90% of them. ... This is much faster then deleting strings. ...
    (comp.lang.pascal.delphi.misc)
  • My bass is playiing great now
    ... I decided to have a go at adjusting my bass myself after reading a load of ... straightened out the neck in relation to the body so the strings were ... All the wierdness is gone and my bass is sounding fine. ...
    (alt.guitar.bass)