fopen - strange encoded filename

This is a discussion on fopen - strange encoded filename within the Windows Programming forums, part of the Platform Specific Boards category; Hi all got a strange problem here on my Windows machine. I need to open/read a file, but the filename ...

  1. #1
    Registered User
    Join Date
    Oct 2007
    Posts
    22

    fopen - strange encoded filename

    Hi all

    got a strange problem here on my Windows machine. I need to open/read a file, but the filename is strangely encoded, so fopen fails everytime with a "no such file or directory". It doesn't matter how I invoke the program (by command line or dragging the file onto my executable).

    Made a screenshot of the file I try to open. Unfortunately I don't know exactly what encoding it is (already tried to find out but failed). Got the file out of another software.

    I tried C-code (fopen, _wfopen with different encoding options like UNICODE, UTF-8, UTF-16LE) as well as C++-code (ifstream). Nothing works.

    Best regards
    Rafael
    Attached Images Attached Images  

  2. #2
    Guest Sebastiani's Avatar
    Join Date
    Aug 2001
    Location
    Waterloo, Texas
    Posts
    5,657
    Try this:

    dir > files.txt

    Your text editor may be able to show the filename - if not, just open files.txt with a hex editor.

    EDIT:
    On second thought, why not just rename it?

  3. #3
    Registered User
    Join Date
    Oct 2007
    Posts
    22
    Hi

    will try that for once. Well, I must convert many of these files to another encoding, as well as the filename. Doing that by hand...well, no thanks

    Best regards
    Rafael

  4. #4
    Registered User
    Join Date
    Oct 2007
    Posts
    22
    Resovled that one. It actually just was the command line call that was wrong. Windows prepended a '+' to the actual filename...corrected that, worked. My bad...

    Best regards
    Rafael

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Networks Project fopen (input filename)
    By TaiL in forum C Programming
    Replies: 7
    Last Post: 07-13-2009, 05:05 PM
  2. fopen, include string in filename.
    By lenxe in forum C Programming
    Replies: 3
    Last Post: 03-09-2009, 08:59 AM
  3. Replies: 18
    Last Post: 09-23-2008, 12:59 PM
  4. fopen filename parameter
    By stanlvw in forum C Programming
    Replies: 5
    Last Post: 06-14-2008, 11:37 PM
  5. strange fopen behaviour
    By AngKar in forum C Programming
    Replies: 2
    Last Post: 01-09-2006, 05:58 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21