Current Position:Home > Folder containing Swedish characters isn't recognise. IsDirectory()

Folder containing Swedish characters isn't recognise. IsDirectory()

Update:12-10Source: network consolidation
Advertisement
Hello!
I have a problem with an application that is supposed to delete folders containing to files.
It works fine but a folders name contain Swedish charters the applications doesn't work
because that folder doesn't get recognizes as a directory by isDirectory().
public static boolean deleteDir(File dir) {
        if (dir.isDirectory())
            String[] children = dir.list();
            for (int i=0; i<children.length; i++)
                boolean success = deleteDir(new File(dir, children));
if (!success)
return false;
// The directory is now empty so delete it
return dir.delete();
Is there a way to get this work?
Help.
Best regards                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

The Best Answer

Advertisement
Bor0 wrote:
Hello!
I have a problem with an application that is supposed to delete folders containing to files.
It works fine but a folders name contain Swedish charters the applications doesn't work
because that folder doesn't get recognizes as a directory by isDirectory().Are you sure that that is the problem?
I created a folder named "Detta är ett katalognamn" and executed this code:
public class DirectoryTest {
    public static void main(String[] args) {
        String directoryName = "Detta är ett katalognamn";
        System.out.println("isDirectory: " + new File(directoryName).isDirectory());
}It prints:
isDirectory: true
Kaj
  • Folder containing Swedish characters isn't recognise. IsDirectory() Update:12-10

    Hello! I have a problem with an application that is supposed to delete folders containing to files. It works fine but a folders name contain Swedish charters the applications doesn't work because that folder doesn't get recognizes as a directory by i

  • LR 2.1 Unable to Open as Smart Object in PS CS3 due to swedish characters in folder name Update:10-11

    When I try to open a raw file from Lightroom 2.1 as a smart object in Photoshop CS3 and the folder contains swedish characters, like åäöÅÄÖ, it will not open at all -> PH starts up and presents a "Open As" dialog. It works fine when I open im

  • Special/Swedish characters in an AXL request Update:10-11

    Hello, I am developing an application that is adding a user to the Call Manager (4.1). When I try to add a name with swedish characters (???) the CCM changes them to question marks "?". I have tried adding the swedish characters unicode encoded,

  • Issue with Swedish Characters in mail body Update:10-11

    Hi, We are sending mails to some other system from SharePoint. All the swedish characters like ä,Ä,ö become ???. When we are sending mails from outlook to that system , we are getting proper mail. so the issue is from sharepoint side. we are sending

  • Swedish characters in OEM reports Update:10-11

    Hi, I have created a report that lists a table that have text with swedish characters in it. When i publish the report as "Whenever the report web page is viewed" the charachters is shown correctly, but with the option "Only when scheduled&

  • Problems displaying swedish characters ! Update:10-11

              Hi !           I have a very strange problem, which I have been struggling with for a while now.           I have a JSP page which calls Java classes to generate a HTML table. I define the           basic structure of the table in the JSP f

  • Upload files with swedish characters NS 4.7 Update:11-30

    Hi, I can upload files with swedish characters in the file name with IE 5, but not with Netscape 4.7. iFS presents an error message that the file doesn't exist or is empty. Is there a solution for this problem? /Elin nullcheck out if you are using ja

  • Swedish characters hangs Staroffice 8 Update:11-30

    HI, I have just installed Staroffice 8 on Solaris 9/sparc but when trying to write Swedish characters "������" writer hangs! Is this a know bug or is there something else in the environment that is wrong? /michaelHave you compared the HTTP respo

  • Swedish characters.... Update:11-30

    I am having serious problems with swedish characters under Oracle 8.0.5 for Linux. I have selected the WE8DEC charset for my ORCL instance and the NLS_TERRITORY AND NLS_LANGUAGE are properly set in the initORCL.ora file, but i just cant get the chara

  • Swedish characters wont display! Update:11-30

    How do I get these swedish characters " å, ä , ö " to show up in a dynamic text box? Do I have to embed a particular character map....which one? thanks Tfigured it out...I just embed: å, ä , ö doh!Read other 2 answers