Re: Reading files with scandinavian characters in filename on Mac OS X.

Jan Grathwohl <[email protected]> Tue, 8 Feb 2005 09:34:21 +0100
Newsgroups gmane.comp.web.webobjects.admin
Message-ID <[email protected]>
Hi Zaphod,

I don't know anything about the problem with UFS, but you could try to  
read from HFS+ by using the ERXFile class from Project Wonder. It  
worked fine for me when I had to read filenames containing different  
kinds of accentuated characters, German umlauts etc from HFS+ file  
systems.

See  
http://cvs.sourceforge.net/viewcvs.py/wonder/Wonder/Common/Frameworks/ 
ERExtensions/Sources/er/extensions/ERXFile.java?view=markup

Jan


Am Samstag, 05.02.05 um 03:16 Uhr schrieb Zaphod B:

> Hello there,
>
> I have having problems with scandinavian character support on Mac OS X.
>
> I am trying to read a file with scandinavian characters in the  
> filename with my java app. I have written a small test program to try  
> to read the file.
>
> I have on a UFS partition a directory called char and a file  
> 3ÅØÆäö.jpg inside this directory. What my app tries to do is to open  
> an input stream to this file:
>
> String[] files = directory.list ();
> File source = new File (files[0]);
> System.out.println ("source name: " + source.getName ());
> System.out.println ("source size: " + source.length ());
> FileInputStream fis = new FileInputStream (source);
>
> And this is the output:
>
> source name: 3¯®.jpg
> source size: 0
> java.io.FileNotFoundException: 3¯®.jpg (No such file or directory)
>         at java.io.FileInputStream.open(Native Method)
>         at java.io.FileInputStream.<init>(FileInputStream.java:106)
>         at FileNameTester.main(FileNameTester.java:71)
>
> Why am i getting this FileNotFoundException? This problem does not  
> happen on Linux or Windows. Doesn't Mac OS X support characters like  
> these?
>
> -- Additional information: --
>
> I have to have the file located on a UFS partition. This is because  
> HFS+ seems to have problems supporting files with such characters in  
> the filenames. Example, I have this 3ÅØÆäö.jpg file on a UFS partition  
> and when I try to cp, mv, ditto, I get Invalid argument, example:
>
> cp: ./3ÅØÆäö.jpg: Invalid argument
>
> Also, if I have a zip file, say myZip.zip, with this file inside it,  
> and when I try to unzip it onto the HFS+ partition, i get this:
>
> error:  cannot create 3ÅØÆäö.jpg
>
> ----
>
> Why can't HFS+ support this?
>
> Hope you can help. Thanks!
>
> Z
>
>
> 		
> ---------------------------------
> Do you Yahoo!?
>  All your favorites on one personal page – Try My Yahoo!
> _______________________________________________
> WebObjects-admin mailing list
> [email protected]
> http://www.omnigroup.com/mailman/listinfo/webobjects-admin
>