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

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                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

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

Similar Messages

  • LR 2.1 Unable to Open as Smart Object in PS CS3 due to swedish characters in folder name

    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 images that is in a folder only having english characters...
    As I read that some apostrophe-related problems were fixed in the 2.1 release I hoped that it included all special characters allowed in folder names... The same problem occurs in version 2.

    My problem might be of a similar origin.
    I have also posted it on a different thread http://www.adobeforums.com/webx/.59b6903c
    I use mostly Hebrew characters for Keywording (the file names are in English) after opening in CS3 and saving, the keywords are converted from Hebrew fonts to accented fonts like åäöÅÄÖ.
    This didn't happen in LR1 and does not happen if I use CS3 as my secondary editor (not using the new LR2 edit in CS3 functionality)
    Shai

  • Swedish characters hangs Staroffice 8

    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?
    /michael

    Have you compared the HTTP responses between the working and non-working
    ones?
    Peace,
    Cameron Purdy
    Tangosol, Inc.
    http://www.tangosol.com
    +1.617.623.5782
    WebLogic Consulting Available
    "Johan Thorselius" <[email protected]> wrote in message
    news:3ac9ed18$[email protected]..
    >
    We have a problem with swedish characters using Solaris 8, WLS 6.0 andOracle 8.1.7.
    When we insert text containing swedish characters to html input fieldsthey turn
    up as invalid characters. At the same time, when reading text from Oracleto the
    same JSP pages everything looks fine. We don't think this has anything towith
    Oracle, it must be something at the WLS level, in the servlet and or JSP.We don't
    see the problem using WLS on Windows NT. Can this be a problem with thecharacter
    set ? How do we solve it ?

  • Mail: "Message contains NUL characters," not listed in ANY folder

    On occasion, I will hear a new message sound in Mail, and I will see the little progress indicator showing an incoming message, but there is no trace of it in the inbox. If I am there to see the incoming notice and remember the message content, I can search for the message content in Spotlight and it will open the message. But if I then click "Show in Mailbox," it opens a Mail list window that is empty and labeled "No mailbox." If I try to move the message by dragging its title bar icon, nothing happens. If I try to use the Move command, I get "Append failed: Message contains NUL characters." If I command-click the message title bar, it tells me it's inside the inbox, but again it won't list it in the inbox. The physical message file itself resides in the Inbox folder in the Mail folder on the desktop. Rebuilding the mailbox does not make it appear in the list.
    I've found various workarounds for shaking Mail into realizing the message exists and listing it, but my real question is this: The above is when I notice that a message has come in but is not listed. But what about messages that come in and are not listed, and I do not know they are there because I wasn't around when they came in?
    How can I use a mail rule or other tool to locate messages that are not listed in any mailbox, or contain NUL characters?
    I would really like to know if I've missed any important messages because they never appeared in the list, even though they exist somewhere.
    Mail will not allow me to set up a mail rule on folders when no folder is specified.

    One thing I can suggest you try is to move the Envelope Index files from your User Library>Mail Folder>MailData.
    Quit Mail first, navigate to those files and move them to the desktop. Restart Mail. It should give a message that you need to Import your mail. Click continue. That should reindex all your mail messages.
    This should help with wrong message counts, ghost messages, and hidden message problems.
    Once Mail is running and OK, you can trash those files.

  • Outlook Folder name contained invalid characters or is only spaces

    Folder name contained invalid characters or is only spaces

    Hi,
    It seems the issue is that you receive the message when you are using Outlook.
    First please let me know, what type of account are you using in Outlook? Exchange, IMAP or POP3?
    I suggest you logon the Webmail/OWA to check whether there are any special characters in the folder names. If there are, remove the special characters and check if Outlook still prompts this message.
    This issue can also be caused by some anti-virus program or 3rd-party add-ins. Please disable the anti-virus program temporarily to check the result. I also suggest you start Outlook in Safe Mode to determine whether it's related to add-ins:
    Press Win + R, type "outlook.exe /safe" in the blank box, press Enter.
    If there's no problem in Outlook Safe Mode, go to FILE -> Options -> Add-Ins to disable the suspicious add-ins to verify which on caused this problem.
    Since the information you provided is quite limited, you can also let me know what you have done recently to the PC or Outlook before this issue occurred.
    Regards,
    Melon Chen
    TechNet Community Support
    It's recommended to download and install
    Configuration Analyzer Tool (OffCAT), which is developed by Microsoft Support teams. Once the tool is installed, you can run it at any time to scan for hundreds of known issues in Office
    programs.

  • The File name property is not valid. The file name is a device or contains invalid characters

    I have an SSIS task that has run successfully for years. They just moved the dtsx to a new server and now it is failing. 
    Issue:
    The task has a data flow that writes a raw file destination. It then has a subsequent data flow that reads the raw file destination. 
    The path and name of the raw file is passed to each of the data flows via the same variable. 
    The raw file resides in a folder on the server in the same path that the dtsx resides in. 
    The task fails with the "The File name property is not valid. The file name is a device or contains invalid characters" error when trying to access the raw file.
    What we have done to troubleshoot:
    1. I ran the task successfully on my local machine so it is definitely a server issue.
    2. The first thing we were seeing was that it failed trying to write to the raw file. The task is set to "Create Always". 
    3. We saw that the dba's copied over the entire directory structure from the old server which included a previously created raw file, so we deleted the raw file.
    4. We reran the task and it successfully wrote a new raw file but then failed on reading the raw file with the same error as above.
    5. We reran the task AGAIN and this time it failed trying to write the raw file throwing the same error as above.
    6. The dba looked at the directory and the account that performs the task has full control.
    7. The dba looked at the raw file that was created and verified that the account that performs the task has full control of the file and that it is the owner of the file.
    Summary:
    The task fails when trying to access the file EXCEPT when the file does not exist. In that situation it can write the file but subsequently fails in accessing it again.

    Hi Whalensdad,
    Based on my research, the issue can be caused by the following reasons:
    There are some invalid characters in the File name at package runtime. In this scenario, just as Russ said, could you please post the value that is in the File name variable? Also use a Script Task with Messagebox.show to show the variable values at runtime.
    May be it changes to others at run time.
    The account runs the package not having access to all the folders in the path. Since you are moving the dtsx file from one server to the current server, do you also move the raw file to the same folder in the current server? Does the user runs the package
    have access to all the folders in the path? To solve this, please ensure that the user has access to all folders and the raw file in the path on the current server.
    Thanks,
    Katherine Xiong
    If you have any feedback on our support, please click
    here.
    Katherine Xiong
    TechNet Community Support
    Please see the response above. I can't use a message box on a server so I logged the values to the database. The resource account has full control to the folder. I haven't been able to get the DBA to check the SQL Agents permissions, but I was always under
    the impression that if you use "Run As" on the task, it will not use the SQL Agent but the account you identify it to "Run As". The "Run As" account has full control on the folder and file.

  • Special/Swedish characters in an AXL request

    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, ? = &#246, but then I get a AXL syntax error.
    Adding the names with swedish characters using the normal CCM interface works fine.
    Any idea what I could be doing wrong?
    Thanks in advance
    Tomas

    I believe it would be helpful if you share the code that writes the axl requests (I asked which ones you used.. you did not reply so far).
    Here's an addUser request that uses an ? and a ? and my code - based on the java code from the sdk to make axl requests- has no trouble sending it.. and the user is created with the proper characters:
    http://www.cisco.com/AXL/1.0" xsi:schemaLocation="http://www.cisco.com/AXL/1.0 http://gkar.cisco.com/schema/axlsoap.xsd" sequence="1234">
    H?nsliB?nzlihbue1234512345
    However, if you do a getuser, and use the same code to send / receive requests, the result will be distorted.. that's because data from the dc directory comes back UTF-8 encoded, whereas data from the database comes back as Latin (that's the default character set on your and my computer).. since the request can be sent without making any changes, that means you don't need UTF-8 encoding.. you should not do anything with the encoding, unless your default character set isn't Latin1 (it's the default throughout Europe.. even if you have an English OS, as long as the regional settings are for a European country, you'll have the proper character set..
    Don't forget though: getXYZ comes back latin encoded if the data is from the SQL server, and UTF-8 encoded if it's from the DC directory.. so you have to tell the stream reader that the data is utf-8 encoded when you do a getuser (at least for ccm 4.1.3).

  • The file name is not valid. The file name is a device or contains invalid characters.

    Hi ,
    I am getting below error in SSIS 2008 package when it is run through control-m
    The file name is not valid. The file name is a device or contains invalid characters.
    component "FF_SRC_InboundFidelityInputFile" (1) failed the pre-execute phase and returned error code 0xC020207E.
    although this package is working fine in dev environment from visual studio.
    control-m agent has proper permissions to the folder still it is failing. Please if anyone knows solution for this issue. I am working on this issue since more than a week but reached nowhere. Please help.
    Thanks 
    Paras Gupta

    Hi Paras,
    Based on your description, it is not the VS IDE issue, if it is related to the SSIS, I suggest you post the issue in this forum here:http://social.msdn.microsoft.com/Forums/sqlserver/en-US/home?forum=sqlintegrationservices
    , and there you would get better response.
    Best Regards,
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • IPad isn't recognised by computer and no longer charges

    I can't update to ios5 as my ipad2 isn't recognised by the computer when I plug it in to USB port.  I've tried to charge the iPad but the iPad states "not charging". It only trickle charges now.  Tried re-installing iTunes, using different USB ports and connectors as well as carols different plug sockets.  Very grateful for any suggestions as I'm baffled! Thanks

    You could try testing with another program like Image Capture found in the Applications folder.
    If that program also does not show the camera then try a different USB port on the computer.
    If you have a memory card reader you could try that as well.
    If the issue still persists then checking your camera's settings in keeping with TD's advice would be a good idea. It may be in the wrong mode.

  • Error: 'InfoObject ZDATE contains invalid characters in record 1 in value'

    Dear friends,
    When I am uploading data from oracle datasource (in BW 3.5) I am getting an error 'InfoObject ZDATE contains invalid characters in record 1 in value'. There are no illegal characters in the date instead the date field is blank in datasource. There are other date fields technically the same as ZDATE with blank values but they dont throw an error when scheduler runs.
    Though when I manually upload the data, it's loaded successfully.
    Please suggest where can the error be?
    Regards,
    Amit Srivastava

    You have 2 options:
    1. Corect your data for the characteristics that give errors.
    Or
    2. go to SPRO in BW - Netweaver - BW - general settings - maintain permitted characters.
    In this screen, you maain tain any special characteristic that you the system to recognise and accept. In your case, take your characteristics that give error and add to this.
    Ravi Thothadri

  • Message Folder contains phone logs

    Hi,
    I also have 8700g V4.5.0.55 (Platform 2.7.0.68).  I've notice that a Message Folder contains not only email but also phone logs (records of missed call, outgoing call, incoming call, etc.) in the same folder.  How do I get rid of this?  My BOLD doesn't have phone logs shows in Message Folder.
    One more thing, is there any way to turn off LED status when it is being charge - like BOLD when you put it in Bedside Mode.  I thought I did it once but can't recall how I did it.
    Thanks.
    Solved!
    Go to Solution.

    Hi darwin. To make sure you don't see any phone call info in your messages, hit send (green button) then hit menu. Go to options and select call logging. Select none and you're good to go. As far as the LED blinking when charging, I'm pretty sure there isn't a way to turn this off on your model. The only thing I can think of would be to turn it face down or put it in a case or something I hope I was of some help!
    BlackBerry® Z10
    Editor
    www.berryreview.com

  • IPad 1 isn't recognise as an external hard-drive.

    I have a bunch of folders on my iPad 1 that I want to add to my computer and back up. When I go to my 'Computer' file it isn't recognising my iPad as an extra/external hard-drive. The problem I'm having is that it IS being recognised in my iTunes and the camera software always reads.
    - I have tried different computers and USB ports
    - I have tried different USB cables
    - I have tried restarting both my computer and iPad
    - I have tried configuring
    - Apple Mobile Device Support is installed correctly
    - I've have no third party conflicts
    Yet still nothing.
    The operating system I'm using is iOS 5.1.1 as it will not let me update to the new versions anymore.
    Please help any ideas welcome esp if they don't include buying a new devise.

    You cannot mount the iPad like an external drive. It's not meant to work that way - at least out of the box anyway. There are some third party apps that let you do what you want to do.
    This is app will do that and it works in iOS 5.
    File Manager - Folder Plus on the App Store on iTunes
    However, depending on what is in these folders, you can use apps like DropBox, Or use iCloud, you can email files and you can use iOS file sharing to move files back and forth from iPad to computer

  • I am trying to install itunes 10.5 but I get an error message that says click ok to try again or enter an alternate path to a folder containing the installation package iTunes.msi...I try to point iTunes to the .msi file but that is not working.

    i am trying to install itunes 10.5 but I get an error message that says "click ok to try again or enter an alternate path to a folder containing the installation package iTunes.msi..." I try to point iTunes to the .msi file on my c drive but then it gives me  a message says "the file location is not a valid installation packaage for the product iTuness.  Try to find the installation package 'itunes.msi' in a folder from which you can install iTunes".  Any help, insight, guidance would be greatly appreciated!!

    "The feature you are trying to use in on a network resource that is unavailable. Enter alternate path to a folder containing the installation package itunes64.msi".
    Download the Windows Installer CleanUp utility from the following page (use one of the links under the "DOWNLOAD LOCATIONS" thingy on the Major Geeks page):
    http://majorgeeks.com/download.php?det=4459
    To install the utility, doubleclick the msicuu2.exe file you downloaded.
    Now run the utility ("Start > All Programs > Windows Install Clean Up"). In the list of programs that appears in CleanUp, select any iTunes entries and click "Remove", as per the following screenshot:
    Quit out of CleanUp, restart the PC and try another iTunes install. Does it go through properly this time?

  • I am trying to download itunes 10.6 and keep getting this error message, "The feature you are trying to use is on a network resource that is unavailable to a folder containing installation package itunes64.msi".  What do I need to do?

    I am trying to download itunes 10.6 and keep getting the error message "The feature you are trying to use in on a network resource that is unavailable. Enter alternate path to a folder containing the installation package itunes67.msi".  Where do I find this or how do I get it?

    "The feature you are trying to use in on a network resource that is unavailable. Enter alternate path to a folder containing the installation package itunes64.msi".
    Download the Windows Installer CleanUp utility from the following page (use one of the links under the "DOWNLOAD LOCATIONS" thingy on the Major Geeks page):
    http://majorgeeks.com/download.php?det=4459
    To install the utility, doubleclick the msicuu2.exe file you downloaded.
    Now run the utility ("Start > All Programs > Windows Install Clean Up"). In the list of programs that appears in CleanUp, select any iTunes entries and click "Remove", as per the following screenshot:
    Quit out of CleanUp, restart the PC and try another iTunes install. Does it go through properly this time?

  • I am trying to update itunes but keep getting 'The feature you are trying to use is on a network resource that is unavailable - Click OK to try again, or enter an alternate path folder containing the installation package 'itunes64msi' in the box below'. ,

    I am trying to update itunes but keep getting 'The feature you are trying to use is on a network resource that is unavailable - Click OK to try again, or enter an alternate path folder containing the installation package 'itunes64msi' in the box below'.
    I am unable to install and also i cannot uninstall itunes, can anyone HELP PLEASSSSSSEEEEEE!!

    (1) Download the Windows Installer CleanUp utility installer file (msicuu2.exe) from the following Major Geeks page (use one of the links under the "DOWNLOAD LOCATIONS" thingy on the Major Geeks page):
    http://majorgeeks.com/download.php?det=4459
    (2) Doubleclick the msicuu2.exe file and follow the prompts to install the Windows Installer CleanUp utility. (If you're on a Windows Vista or Windows 7 system and you get a Code 800A0046 error message when doubleclicking the msicuu2.exe file, try instead right-clicking on the msicuu2.exe file and selecting "Run as administrator".)
    (3) In your Start menu click All Programs and then click Windows Install Clean Up. The Windows Installer CleanUp utility window appears, listing software that is currently installed on your computer.
    (4) In the list of programs that appears in CleanUp, select any iTunes entries and click "Remove", as per the following screenshot:
    (5) Quit out of CleanUp, restart the PC and try another iTunes install. Does it go through properly this time?

Maybe you are looking for

  • HT5012 Hdmi does not work on my iPad or iPhone since doing the update 7.0.2

    iPad and iPhone the hdmi out does not work have audio but no picture since I update to 7.0.1 or 7.0.2 is still does not work it did before

  • Read Large Files Using BPEL File Adapter

    Hi, I have a scenario, where files of large size in text format are to be read and send to 3rd party. MTOM Policy has to be attached. Files of size 3MB or less are polled and size greater than 3 MB are not Retrieved. How can I resolve the issue. Do I

  • Search stopped working in AIR

    Hello, It's me again. Sorry, but I am still poking around with RH 8 and AIR and trying to learn everything. I just inserted a second pdf into my project and installed the AIR output. However, the search is no longer working (was working before this p

  • Win 8 admin problem

    I use win 8.1 and I have one user called goksen and it has administrative previliege and also default administrator account is disabled, uac is disabled as you see in control panel picture I can't change to standart account this is normal but in seco

  • Having trouble Batching with PS CC 2014?

    Having trouble Batching with PS CC 2014? Do you have to go back and use PS CC? Actulally that wasn't working either. Maybe it is me on the CC version.