How to use the utf-8 charset encoding for files' URL

Hello,

I have to load images wich names contain accents. So I used this

ImageIcon image_file =new ImageIcon();

image_file.setImage(ImageIO.read(new URL("file://" + URLDecoder.decode(ThumbUrl,"UTF-8"))));

But I still have a java.io.FileNotFoundException.

Have you please any solution.

Thanks in advance.

[464 byte] By [WebServicea] at [2007-11-27 11:42:26]
# 1

When I used

image_file.setImage(ImageIO.read(new URL("file://" + URLEncoder.encode(image.getThumbUrl(), "UTF-8"))));

The "/" where encoded like this "%2F"

So I have an UnknownHostException

How can I do please.

Thanks in advance.

WebServicea at 2007-7-29 17:44:07 > top of Java-index,Java Essentials,Java Programming...