File Name error when creating file in Solaris C locale

Background Info:
1.In Java, we can use new File(filename) to create a new file. The filename there is a string denoting the name of the new file.
2.As mentioned in bug4409965, "The 'C' locale in a 7-bit ASCII locale, the 8bit characters enteredn are not read in properly probably because in that locale, the input byte stream is expected to contain only 7bit characters, anything else is 'garbage'".
My problem is:
when I tried to construct a filename containing non-ASCII characters in the Solaris C locale, Java works quite different from C language.
To be specify, follwing c code works quite well in C locale:
char * temstring = "\0xd6\0xd0";
FILE* fd = fopen(temstring, "w+");
fprint(fd, "test");
fclose(fd);
Although the created file can't be viewed in C locale, the filename shows quite well in other suppoted locale , which means the filename doesn't get modified.
While in Java, the following code
File f = new File("\0xd6\0xd0");
fos.println("test");
try {
f.createNewFile();
} catch (IOException e)
System.err.println(e.toString());
will generate the file in C locale as ???? as garbage file name. Even in the proper locale, the filename can't be read correctly.
I doubt the JVM in Solaris (file unixfilesystem.c) has modified the input filename and made the filename unreadable.
I just wonder if there is some workaround to solve this problem, which means I can correctly generate the filename using Java just as what the C code has done: create the file just as what I denote instead of modifing the filename.
Thanks

Hello:
Any luck with this problem?
I am facing the same problem and was wondering if you had found a solution....
Thanks
Kiran

Similar Messages

  • Invalid File Name Errors when syncing to Ipod

    Ever since an update last fall I have been getting Invalid file name errors when I try to sync my ipod. A window would pop up saying "Windows could not copy 'SONGNAME' to the iPod 'IPODNAME' because an unkown error occurred (-37)." I would press OK and another window would immediately pop up that would say, "Attempting to copy to the disk 'IPODNAME' failed. the file name is invalid or too long."
    The windows would keep popping up countless times until the sync would just seem to time out and stop.
    The problem songs would have no problem playing in iTunes.
    Prior to the update this did not happen. No new songs were added around this time and nothing was changed to my file directory structure. I was too busy to troubleshoot this problem at the time and hoped that another update would fix it. Well, here I am many months and updates later and still no fix. After fiddling with iTunes and resetting my Ipod multiple times (goodbye saved angry bird games)I have found out that:
    1. By writing down the file name when the error windows pop up I can get a partial list of the problem file names. I could not get a complete list of the problem files because the sync would time out before a full list could be compiled (the list appears to be in the hundreds).
    2. If I changed the name of the file by adding OR deleting one character, remapping the song in itunes, the song would then sync properly.
    3. If I changed the name of the file, remapped the location of the file within iTunes, changed the name of the file BACK to the original name that iTunes supposedly had a problem with, and then remapped the location of the song within iTunes, the song would then sync properly
    4. If I moved the song to a different directory without changing the file name, remapped the song within iTunes, the song would sync properly.
    5. If I moved the song to a different directory without changing the file name, remapped the song within iTunes, moved the file BACK to the original directory, remapped the song again, the song would sync properly.
    6. If I renamed the file and then named it back to the original file name WITHOUT remapping the file location in iTunes, the song would still not sync properly
    7. If I moved the file into a different directory and then back again without remapping the file location, the song would still not sync properly.
    8. Changing or deleting the tags has no effect at all.
    9. File name lengths are already under 200 characters and there are no special characters used.
    So, to sum up, I have found out a way to fix the issue. The problem is, that there are hundreds of songs that appear to be affected and renaming or moving every single one individually and then remapping is extremely inefficient and ignores the cause of the problem. I also did not want to delete the itunes library and then add all of the songs back in because I have many custom playlists that I have spent hours creating and I do not want to delete them.
    Is there a better way to fix the problem? Especially if someone knows the root cause?

    I got a procmon log file and examined it. I have the file and I could also provide you with that or screenshots of it.
    There is nothing unusual about it. I can see entires in which CR has successfully opened the report and has cached in a c:\windows\temp.
    However there is one or two non-successful entries that may be related, especially that examining the stack trace brings us to a call to get_ProductLocaleID():
    - A call to read reg entry HKU\S-1-5-20\Software\Business Objects\Suite 12.0\Crystal Reports\Locale fails with NAME NOT FOUND.
    - immediately after that and from the same process (w3wp.ex) there is a call to open directory "c:\" which is logged as ACCESS DENIED.
    Any subsequent unsuccessful calls seem to be results of exception handling in the debug code.
    Does this point to any setup issues with CR? We always run the redistributable x86 runtime when installing it.

  • Error when creating files for transport request SAPK-700BGINPLMWUI

    Hello experts,
    We're upgrading our 46c System to ERP 6.0 EHP4.
    In Phase  EHP_INCLUSION we get the following error Message: Disassembling package queue failed, rc = "2", reason = "Error when creating files for transport request SAPK-700BGINPLMWUI"
    We've already checked the SAINT version; Upgrade Fix, SAPCAR version. We've checked our TMS as well and everything seems  O.K.
    Any help would be really appreciated!!!
    Complete Error message:
    EhP component PLMWUI, 700                                                                               
    Looking for SAINT package for 'PLMWUI' ...                                                                               
    R3upReadNewPackages:                                                                               
    patchType='U', langVect='DEC'                                                                               
    RFC Login to: System="X05", Nr="00", GwHost="sxt ", GwService="sapgw00"                                                 
    RFC Login succeeded                                                                               
    Calling function module "spda_read_new_packages" by RFC                                                                     
      ismovesVersion='0'                                                                               
    R3upReadNewPackages: exit: rc=0                                                                               
    ... No matching package found.                                                                               
    R3upReadNewPackages:                                                                               
    patchType='I', langVect='DEC'                                                                               
    RFC Login to: System="X05", Nr="00", GwHost="sxt ", GwService="sapgw00"                                                 
    RFC Login succeeded                                                                               
    Calling function module "spda_read_new_packages" by RFC                                                                     
      ismovesVersion='0'                                                                               
    R3upReadNewPackages: exit: rc=0                                                                               
    Found: name = 'PLMWUI', release = '700', package = 'SAPK-700BGINPLMWUI', type = 'AOI'                                  
    ... Matching package found: 'PLMWUI','700','SAPK-700BGINPLMWUI'                                                             
    (trc) R3upPatchDisassembleQueue: 1 package queue entries                                                                    
    (trc) R3upPatchDisassembleQueue: force=YES                                                                               
    (trc) R3upPatchDisassembleQueue: 1 packages will be disassembled                                                            
    Starting disassembling package queue                                                                               
    Date & Time: 20100319133139                                                                               
    Starting RFC Login to: System = "X05", GwHost = "sxt ", GwService = "sapgw00"                                           
    RFC Login to: System="X05", Nr="00", GwHost="sxt ", GwService="sapgw00"                                                 
    RFC Login succeeded                                                                               
    Calling function module "SPDA_DISASSEMBLE_QUEUE" by RFC                                                                     
    Input table IT_PATQ:                                                                               
    "SAPK-700BGINPLMWUI","000","AOI","PLMWUI","700","SAP PLM Web UI","00"                                                       
    Call of function module "SPDA_DISASSEMBLE_QUEUE" by RFC succeeded                                                           
    Logging off from SAP system                                                                               
    Date & Time: 20100319133139                                                                               
    Disassembling package queue failed, rc = "2", reason = "Error when creating files for transport request SAPK-700BGINPLMWUI"

    Hello Anthes,
    Please Check the things in following sequence :
    1.Use latest SAPehpi, R3trans and tp versions.
    2. users/group authorization issue and/or ownersip limitations (set 777) .Reboot the server to make sure, that the authorisations are updated and there is no lock on a file in the EHPI dir.Repeat the phase.
    Folders where permissions should be 777 are Upgrade directory, Data Directory, Cofile directory and .../EPS/in.
    3. Source file corruption can be ruled out by execution
    R3trans -l /usr/sap/<SID>/..../abap/data/R-700BGINPLMWUI.SAP (The data file corresponding to the Package which is giving error). Check if this ends fine.
    Note 2050
    4. Confirm that your transport tool is 'healthy' by testing it in STMS. In SPAM in client 000 use the function Disassemble package and enter the package <Package name>.
    5. Try to update the kernel if it not helps.
    Best Regards
    Niraj

  • "Invalid file name" error when trying to load the report in IIS/CR 2008

    We have deployed our application to many installations with no problem however in one particular case we get this error whenever we try to load any reports in our web app.
    I made sure that the DefaulAppPool user (Network Service) has read+excute on all folders as well as the IIS anonymous user.
    The anonnymous access is off but Windows Integrated Security is on.
    ASP.NET Version:2.0.50727.3082
    Web.config is healthy and is listed below.
    Other pages in the application which are not depenent on C.R load and run perfectly.
    I don't know what else to check
    thanks for you help
    jeff
    Web.Config Entries related to CR ***********
    <compilation debug="true">
    <assemblies>
    <add assembly="CrystalDecisions.Web, Version=12.0.2000.0, Culture=neutral, PublicKeyToken=692FBEA5521E1304"/>
    <add assembly="CrystalDecisions.Shared, Version=12.0.2000.0, Culture=neutral, PublicKeyToken=692FBEA5521E1304"/>
    <add assembly="CrystalDecisions.ReportSource, Version=12.0.2000.0, Culture=neutral, PublicKeyToken=692FBEA5521E1304"/>
    <add assembly="CrystalDecisions.Enterprise.Framework, Version=12.0.1100.0, Culture=neutral, PublicKeyToken=692FBEA5521E1304"/>
    <add assembly="CrystalDecisions.Enterprise.Desktop.Report, Version=12.0.1100.0, Culture=neutral, PublicKeyToken=692FBEA5521E1304"/>
    <add assembly="CrystalDecisions.ReportAppServer.Controllers, Version=12.0.1100.0, Culture=neutral, PublicKeyToken=692FBEA5521E1304"/>
    <add assembly="CrystalDecisions.CrystalReports.Engine, Version=12.0.2000.0, Culture=neutral, PublicKeyToken=692FBEA5521E1304"/>
    <add assembly="CrystalDecisions.Enterprise.InfoStore, Version=12.0.1100.0, Culture=neutral, PublicKeyToken=692FBEA5521E1304"/>
    <add assembly="CrystalDecisions.Enterprise.Viewing.ReportSource, Version=12.0.1100.0, Culture=neutral, PublicKeyToken=692FBEA5521E1304"/>
    <add assembly="CrystalDecisions.ReportAppServer.ClientDoc, Version=12.0.1100.0, Culture=neutral, PublicKeyToken=692fbea5521e1304"/>
    </assemblies>
    <buildProviders>
    <add extension=".rpt" type="CrystalDecisions.Web.Compilation.RptBuildProvider, CrystalDecisions.Web, Version=12.0.2000.0, Culture=neutral, PublicKeyToken=692fbea5521e1304"/></buildProviders>
    </compilation>
      ERROR DETAILS *****************
    [COMException (0x800001fb): Invalid file name.]
       CrystalDecisions.ReportAppServer.ClientDoc.ReportClientDocumentClass.Open(Object& DocumentPath, Int32 Options) +0
       CrystalDecisions.ReportAppServer.ReportClientDocumentWrapper.Open(Object& DocumentPath, Int32 Options) +95
       CrystalDecisions.ReportAppServer.ReportClientDocumentWrapper.EnsureDocumentIsOpened() +356
    [CrystalReportsException: Load report failed.]
       CrystalDecisions.ReportAppServer.ReportClientDocumentWrapper.EnsureDocumentIsOpened() +418
       CrystalDecisions.ReportAppServer.ReportClientDocumentWrapper.get_ProductLocaleID() +31
       CrystalDecisions.ReportSource.CachedObjectReportSource.GetReport(RequestContext context, Boolean bAddToCacheWhenCreated) +474
       CrystalDecisions.ReportSource.CachedObjectReportSource.InternalGetReport(RequestContext context, Boolean bAddToCacheWhenCreated) +15
       CrystalDecisions.Web.CrystalReportSource.get_ReportDocument() +184
       CrystalReportPageTemplate.OnInit(EventArgs e) in

    I got a procmon log file and examined it. I have the file and I could also provide you with that or screenshots of it.
    There is nothing unusual about it. I can see entires in which CR has successfully opened the report and has cached in a c:\windows\temp.
    However there is one or two non-successful entries that may be related, especially that examining the stack trace brings us to a call to get_ProductLocaleID():
    - A call to read reg entry HKU\S-1-5-20\Software\Business Objects\Suite 12.0\Crystal Reports\Locale fails with NAME NOT FOUND.
    - immediately after that and from the same process (w3wp.ex) there is a call to open directory "c:\" which is logged as ACCESS DENIED.
    Any subsequent unsuccessful calls seem to be results of exception handling in the debug code.
    Does this point to any setup issues with CR? We always run the redistributable x86 runtime when installing it.

  • C#: 'Not a Valid File Name' error when I know the name and link are correct.

    I'm receiving "Not a valid file name" when I know I have used this link before and the filename is spelled correctly. I'm not sure if I should be looking at something else. This is my connection code.  It fails on "conn.Open()".
    For security reasons, I edited the link... it is not a working link for this question.
    private void InitializeDBConnection()
    strConn = @"Provider=Microsoft.ACE.OLEDB.12.0;Data Source=http://database.storage.net/App_Data/Tracking.mdb";
    MessageBox.Show(strConn);
    MyConn = new OleDbConnection(strConn);
    MyConn.Open();
    SV

    A database must be locally available via the filesystem, e.g. an UNC path would do it also.

  • File conversion error when combining files

    Hello,
    I am using Adobe Create to combine several files (both word and pdf) into a single pdf document.  I have done this several times in the past with no problems.  However today it won't allow me to combine any documents which are already in pdf format.  The system generates an error for each of these documents as: "Conversion Failed".  I am clearly not trying to convert them, but rather to combine them...  Any ideas?

    Hi gina_hall_7848,
    If you're combining both Word and PDF files into PDF, there is some conversion happening (with the Word docs, as they're converted into the combined PDF file). If you're getting the error when combining only PDF files--that's another story. It could be that one or more of the files that you're combining isn't in a supported format, or that Adobe PDF Pack is timing out before it can complete the conversion.
    Does the error occur regardless of what files you try to combine?
    Best,
    Sara

  • Duplicate File Name error for Unicode file names

    I am trying to rip my music collection from CDs to iTunes. I have decided to use my local language (Bangla/Bengali) as Track/Artist names using Unicode. I can edit the CD Info perfectly. The problem started when I try to import the tracks to iTunes as AAC/mp3. The first track is always imported ok but subsequent tracks fails to be imported. iTunes gave an error message saying the file name already exists where as it was not.
    Please help.

    I reported this to Adobe customer support on 11/29, and here is their response:
    Wednesday, December 5, 2007 12:51:27 PM PST
    Hello John,
    Thank you for contacting Adobe® Web Support for assistance with Adobe
    Photoshop Elements® 6.0.
    I understand that images are deleted if you accidentally try to move
    them to a folder that already includes a file of the same name.
    Thank you for bringing this to our attention. I was able to replicate
    this behavior as well. The best method to report errors of this nature
    is using the following form on our website:
    http://www.adobe.com/cfusion/mmform/index.cfm?name=wishform
    I will report this to the product team through my channels. You may want to submit this issue through the web form as it goes directly to the product development team.
    I hope this information helps to resolve your issue. If you require
    further assistance with this issue, please update your web case with
    complete details, including what steps you have applied and any error
    messages you are receiving.
    You may also call Technical Support at (800) 642-3623. We are available from 6:00 am to 5:00 pm Monday - Friday, Pacific Time.
    Kind regards,
    Alan C.
    Adobe Web Support

  • Determining my database files names and when created

    Hi SOS,
    I wanna ba able to determine the above, can you be of help.
    Secondly, how can i also determined on command line who are still connected on a database?
    thanks in advance
    cube60

    select * from dba_data_files
    select * from v$datafile
    select * from v$session
    Vadim Bobrov
    Oracle Database Tools
    http://www.fourthelephant.com

  • How to display the file name & status when copying files.

    I write a program to backup/copy data from one directory to other directory, and I'm using File List and Runtime.getRuntime().exec("xcopy "+dir1+"\\"+name+" "+dir2+" /y");
    to copy the files, so it will copy the file one by one, and everytime one file is copied, I want to display the result to the screen, but guess what has happened, the screen just display a blank screen, and wait until all the copying processes finish, then it will display all files that has been copied.
    Appreciate your expertise to check my coding below.
    String[] fileList = fbackupSource.list();
    boolean done=true;
    JTextArea backupText = new JTextArea();
    JScrollPane backupScroll = new JScrollPane(backupText,
    ScrollPaneConstants.VERTICAL_SCROLLBAR_ALWAYS,
    ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER);
    JFrame backupWindow = new JFrame("Backup Data");
    backupWindow.setBounds(320,240,400,330);
    backupWindow.getContentPane().add(backupScroll);          
    backupText.setText("Copy files from "+backupSource.toUpperCase()+" to "+backupDest.toUpperCase()+" : \n\n");
    backupWindow.show();
    for (int i=0; i < fileList.length; i++) {                     
    backupText.append(" ("+ i +")... processing " + fileList);
    done = copyFile(fileList[i],backupSource,backupDest);
    if (done=true) {
    backupText.append(" -> done. \n");
    else {
    backupText.append(" -> fail! \n");
    boolean copyFile(String name, String dir1, String dir2) {
    try {
    java.lang.Process proc =
    Runtime.getRuntime().exec("xcopy "+dir1+"\\"+name+" "+dir2+" /y");
    proc.waitFor();
    return true;
    catch (IOException e) {
    return false;
    catch (InterruptedException e) {
    return false;

    Oops, sorry, I should have written "Process.getInputStream()". Here's an example from:
    http://javafaq.nu/tips/opsys/index.shtml
    ==============
    How can I pass a string to the command line(DOS) ? Also i want to capture the output given by the command line in a string.
    Answer: Try this out:
    // works for DOS
    String cmds[] = new String[2];
    cmds[0] = "dir"; // replace with "ls" on UNIX
    cmds[1] = "c:"; // replace with "/" on UNIX
    // execute the command
    Process pro = Runtime.getRuntime().exec(cmds);
    // wait until it's done executing
    pro.waitFor();
    // what did the process output from the Input pipe back to
    // this process (okay, who named this stuff)?
    InputStream out = pro.getInputStream();
    // output it (really slowly)
    int i;
    while ((i = out.read()) != -1) System.out.println((char) i);==============
    Although I don't think this example will do exactly what you want... you might have to delete the waitFor() call and just check to see when there's nothing else to read from the InputStream. It's a start, though, and the web page has a lot of similar examples of this sort of thing.
    Yours,
    Tom

  • "unable to create *file name*" error

    I imported videos from ipod touch to iphoto. Then i try to export the videos on either desktop or external hard-drive and it gives me the "unable to create *file name*" error in both cases. To export videos i go FIle-Export, choose kind "original". Tried to do it with several different albums, and it doesn't work on any of them. Didn't have an issue for exporting pictures though.
    Please help!
    Nina

    What exactly was selected when you did the test?
    Regards
    TD

  • Error when exporting file from LR5.2 - file created

    After updating to LR5.2, I receive an error when exporting files to another disk drive.  a file is created, but a warning appears "Unable to Export:  "An internal error has occurred: Win32 API error 2 ("The system cannot find the file specified.") when calling ShellExecuteExW from AgWorkspace.shellExecute".  I also have CC iunstalled for other applications, but originally installed LR5 as a standalone Adobe application.  I tried removing the program and reinstalling through CC, with no change in this behavior.

    The answer is in the thread:
    http://forums.adobe.com/thread/1303578?tstart=0

  • IMovie error - cannot create file when I attempt to share

    I am using MAC OS X 10.9.5, iMovie 10.0.5.  I have successfully create many movies by using Share to file - of long and short sizes. This particular time I made couple of minor edits to my movie which had previous shared to file with no problem, and when I went to Share to File I get an error message. The Share fails with the error "cannot create file".
    I have plenty of disk space.
    All other applications are closed, just imovie running.
    The destination is the mac internal hard drive.
    I deleted imovie and re-installed it.
    I deleted the Render Files.
    No luck.
    Any clues would be greatly appreciated.
    Super frustrated.
    Thanks.

    docjob2001 wrote:>
    Is there a way to go back download 9.02 again?
    you can download it from here: http://www.versiontracker.com/dyn/moreinfo/macosx/10057115&vid=11116557&mode=inf o
    My only backup is version 8.2 and will not open my itunes library - is there a workaround for this?
    maybe. you could try this:
    to downgrade to a previous iTunes version, you could try this user tip that seemed to have worked for some:
    +1) Quit iTunes.+
    +2) Delete iTunes from your Applications folder.+
    +3) Go to your ~/Music/iTunes folder. Delete or rename the "iTunes Library" file.+
    +4) Open the "Previous iTunes Libraries" folder and look for the backup of your old pre-9 library; it should be dated at about the time you first ran iTunes 9. Copy it back out to the ~/Music/iTunes folder, and rename it to "iTunes Library".+
    +6) click here to download iTunes 8.2.1. The page says it's for G3, but the Read Me file says it'll run on G4, G5, and Intel too. Open the disk image and run the installer.+
    +You should now be able to run iTunes 8.2.1 again.+
    +And your iTunes will restore to before you upgraded and you won't lose anything+.
    good luck !

  • Error when creating ZIP file (return value 2 when IGS was called)

    Hello All
    I attempted to Schedule a Query to the Portal folders and executes fine.  However when it's scheduled to and email, I am getting this message
    'Error when creating ZIP file (return value 2 when IGS was called)'
    Any ideas?
    Thanks ...BK

    Hello Kai
    Thanks very much for the info.  how would I know what patch the IGS is?
    Thank you.
    Regards..BK

  • Error Occurred While Converting the file"name of song" The file name.......

    I get this message when I try to import some CD's to my library.
    A window pops up and says
    Error occurred while converting the file "name of song"
    The file name was invalid or to long.
    Anyone else ever get this message, and how can you import CD's???????

    I have had this exact same problem. I'm not sure how to fix it...

  • Error: Enter either the physical file name or the logical file name

    Hi Expert,
    I have error: Enter either the physical file name or the logical file name, when upload BP with external data transfer.
    My Step:
    1. Define Sender Structure
    2. Define Transfer Rules
    3. Start Transfer
    When execute step 3, there's displaying error:  Enter either the physical file name or the logical file name
    Can you help my problem?
    Any document/link for upload BP with external data transfer.
    Thanks and Regards,

    Hi,
    See thread: [CO-PA External Data Transfer|CO-PA External Data Transfer]
    Regards
    Leon

Maybe you are looking for

  • Can i use another family members upgrade for an iPhone?

    I currently have a Blackberry Bold with unlimited data, and the other line on my plan is just a basic phone. Currently walmart, has the iPhone 5 on sale for $127 but the sale goes off before my upgrade which is on 1/23/12. Back in October one vzw sal

  • Error 'Document 1000 0000000001 2014 already assigned' while posting invoice reduction

    Hi Gurus, here is my situation: I have created sch.agreement, GR done and posted IR. Now created credit memo through MIRO to reverse my previous invoice. then posted IR(consider number as 0000000001) with higher price. then this invoice was rejected

  • Data transfers from SRM to R/3

    Hi, i have follwing questions? 1. How date transfer from SRM to R/3? 2. Why PO transfer throught RFC? why not IDoc? and why confirmation and invoices are transfer using IDOC?. 3. config document for EBP-SUS? Thanks Rams

  • Is there a danger using Flash Player?

    I head rumours about Adobe Flash. Does this include Adobe Flash Player for the Mac?

  • CFMAIL stopped working

    I have numerous CFMAIL tags on the website. Generally, about 100 messages are sent per day. Approximately five days ago, mail stopped being sent. When you send mail, no CF errors occur. I've checked the "Verify mail server connection box" in the CFAd