473,385 Members | 1,356 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

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("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
0 1963

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

13
by: Nicholas Pappas | last post by:
Hello all. I am trying to write a Java3D loader for a geometry file from a game, which has Unicode characters (Korean) in it. I wrote the loader and it works in Windows, but I recently brushed...
20
by: Sean McIlroy | last post by:
I recently found out that unicode("\347", "iso-8859-1") is the lowercase c-with-cedilla, so I set out to round up the unicode numbers of the extra characters you need for French, and I found them...
5
by: Jamie | last post by:
I have a file that was written using Java and the file has unicode strings. What is the best way to deal with these in C? The file definition reads: Data Field Description CHAR File...
9
by: Charles F McDevitt | last post by:
I'm trying to upgrade some old code that used old iostreams. At one place in the code, I have a path/filename in a wchar_t string (unicode utf-16). I need to open an ifstream to that file. ...
8
by: Richard Schulman | last post by:
Sorry to be back at the goodly well so soon, but... ....when I execute the following -- variable mean_eng_txt being utf-16LE and its datatype nvarchar2(79) in Oracle: cursor.execute("""INSERT...
2
by: willie | last post by:
John Machin: # I'll go ahead and concede defeat since you appear to be on the # verge of a heart attack :) # I can see that I lack clarity so I don't blame you. # By UTF-8 string, I mean...
1
by: feathers75 | last post by:
-------------------------------------------------------------------------------- First, Hello eveyone and I am new to Java. I am trying to create a Java program that will calculate a person...
8
by: mario | last post by:
I have checks in code, to ensure a decode/encode cycle returns the original string. Given no UnicodeErrors, are there any cases for the following not to be True? unicode(s, enc).encode(enc)...
8
by: Yves Dorfsman | last post by:
Can you put UTF-8 characters in a dbhash in python 2.5 ? It fails when I try: #!/bin/env python # -*- coding: utf-8 -*- import dbhash db = dbhash.open('dbfile.db', 'w') db = u'☺'
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.