Page 1 of 3 123 LastLast
Results 1 to 10 of 24

Thread: Can't open file if the folder is using a odd letter

  1. #1

    Default Can't open file if the folder is using a odd letter

    Hi,

    When I try to open a office-document, e.g. spreadsheet, I get the following error message:

    /home/brahmavihara/Documents/lönekonto/october.xlsx does not exist.
    The document "october.xlsx" is in a folder called
    HTML Code:
    lönekonto
    . But, as you can see in the above quote, the error message has has a different name for the folder
    HTML Code:
    lönekonto
    So when I rename the folder from "lönekonto" to "lonekonto", I can then open the file. It seems as if there's a bug with handling international characters.

    Is this a opensuse bug or a upstream bug? Where should I file the bug?

  2. #2
    Join Date
    Jun 2008
    Location
    Netherlands
    Posts
    25,966

    Default Re: Can't open file if the folder is using a odd letter

    You do not tell how youy "try to open" it, this below is a bit vague also.

    It looks as if some component does not handle the file name as UTF-8 encoded Unicode. When you do not have any problems in using it with e.g. your file manager (Dolphin or friends), the I would suggest that it is in openOffice (BTW do you still use openenOffice, not LibreOffice?)
    Henk van Velden

  3. #3

    Default Re: Can't open file if the folder is using a odd letter

    Quote Originally Posted by hcvv View Post
    You do not tell how youy "try to open" it, this below is a bit vague also.

    It looks as if some component does not handle the file name as UTF-8 encoded Unicode. When you do not have any problems in using it with e.g. your file manager (Dolphin or friends), the I would suggest that it is in openOffice (BTW do you still use openenOffice, not LibreOffice?)
    I just click on the file in Dolphin. That's when I get the error message. I have LibreOffice as default, so I suppose the message is from LibreOffice. I've also tried to open the file with Calligra. Both of them can't open the file, unless I rename the folder from "lönekonto" to "lonekonto".

  4. #4
    Join Date
    Jun 2008
    Location
    Netherlands
    Posts
    25,966

    Default Re: Can't open file if the folder is using a odd letter

    You have now remaned the directory. Can you rename it back and does that re=create the proble? When yes, how do you rename the directory?

    What does
    Code:
    ls -ld path-to/lönekonto
    show? (where path-to is of course to be replaced by the path to that directory).
    When that failes, try
    Code:
    ls -ld path-to/*konto
    Another question. Is that directory (and it's contents) on a normal Linux file system?
    Henk van Velden

  5. #5
    Join Date
    Jun 2008
    Location
    San Diego, Ca, USA
    Posts
    12,058
    Blog Entries
    2

    Default Re: Can't open file if the folder is using a odd letter

    As hcvv suggests,
    Try invoking from command line.
    Recommend trying something like

    For a text file, the following creates a new text file in your home directory and saves it

    Code:
    vi /home/lönekonto/Documents/test.txt
    
    
    Press the "I" key to insert new text
    Type something.
    Close and save with

    ESC
    CTLx

    The above tests for character support at the system level.
    If the above works, then you should check for support in your installed Desktop.
    If you don't know how to do this, you need to post what Desktop you have installed.

    TSU

  6. #6

    Default Re: Can't open file if the folder is using a odd letter

    Quote Originally Posted by hcvv View Post
    You have now remaned the directory. Can you rename it back and does that re=create the proble? When yes, how do you rename the directory?
    Yes, when I rename it back, it recreates the problem. I renamed it by right clicking on the folder and then "rename".



    Quote Originally Posted by hcvv View Post
    What does
    Code:
    ls -ld path-to/lönekonto
    show? (where path-to is of course to be replaced by the path to that directory).
    When that failes, try
    Code:
    ls -ld path-to/*konto
    Another question. Is that directory (and it's contents) on a normal Linux file system?
    Both of the above commands return

    Code:
    "ls:cannot access /home/user1/lönekonto: No such file or directory
    Yes, I went with the default suggested file system when I installed tumbleweed.

  7. #7

    Default Re: Can't open file if the folder is using a odd letter

    Quote Originally Posted by tsu2 View Post
    As hcvv suggests,
    Try invoking from command line.
    Recommend trying something like

    For a text file, the following creates a new text file in your home directory and saves it

    Code:
    vi /home/lönekonto/Documents/test.txt
    
    
    Press the "I" key to insert new text
    Type something.
    Close and save with

    ESC
    CTLx

    The above tests for character support at the system level.
    If the above works, then you should check for support in your installed Desktop.
    If you don't know how to do this, you need to post what Desktop you have installed.

    TSU
    When I try to save and exit with ESC and CTLx (after having inserted text), I get:

    Code:
    "/home/user1/lönekonto/test.text" E212: Can't open file for writing

  8. #8
    Join Date
    Jun 2008
    Location
    Netherlands
    Posts
    25,966

    Default Re: Can't open file if the folder is using a odd letter

    Hm, strange.

    BTW, it is better to post the complete thing, that is prompt, command, output and next prompt then to say "the command returns". Then there is no misunderstanding whatsoever about where you are, who you are, what you get.

    On my 13.1 I created a directory with that name and put a JPG file in in:
    Code:
    henk@boven:~/test> l lönekonto/
    totaal 164
    drwxr-xr-x  2 henk wij   4096 16 jan 18:25 ./
    drwxr-xr-x 17 henk wij   4096 16 jan 18:23 ../
    -rw-r--r--  1 henk wij 157943 16 jan 18:25 verf.jpeg
    henk@boven:~/test> vi lönekonto/tekst
    henk@boven:~/test> l lönekonto/
    totaal 168
    drwxr-xr-x  2 henk wij   4096 17 jan 12:09 ./
    drwxr-xr-x 17 henk wij   4096 16 jan 18:23 ../
    -rw-r--r--  1 henk wij      7 17 jan 12:09 tekst
    -rw-r--r--  1 henk wij 157943 16 jan 18:25 verf.jpeg
    henk@boven:~/test>
    No problems with vi (you see I entered 7 characters in that file). And also no problems surfing to it with Dolphin and clicking on verf.jpeg opens it in Gwenview.

    Thuis I can nor replicate your situation

    Can you post the ouput of
    Code:
    ls /home/user1 | grep konto | od -x
    Henk van Velden

  9. #9
    Join Date
    Jun 2008
    Location
    Netherlands
    Posts
    25,966

    Default Re: Can't open file if the folder is using a odd letter

    I did some investigation on what it should be. See: http://www.ltg.ed.ac.uk/~richard/utf...3%B6&mode=char

    The statement I asked you to execute on my system:
    Code:
    henk@boven:~/test> ls | grep konto | od -x
    0000000 c36c 6eb6 6b65 6e6f 6f74 000a
    0000013
    henk@boven:~/test>
    Because of the endianness of the system, every pair of hex bytes must be switched. Thus the first character is 6c, which is l.
    The second and third byte here (I coloured them red) are b6 c3, which is what you see in the tabel in the link.

    What you also see in the tabel is the same characters à ¶ that you see. Thus the filename itself is correct encoded This means that the UTF-8 encoding is not used at some moment and instead the program tries/uses Latin-1.

    How is you environment ariable LANG set?
    Code:
    echo $LANG
    Last edited by hcvv; 17-Jan-2016 at 04:34.
    Henk van Velden

  10. #10

    Default Re: Can't open file if the folder is using a odd letter

    Quote Originally Posted by hcvv View Post
    I did some investigation on what it should be. See: http://www.ltg.ed.ac.uk/~richard/utf...3%B6&mode=char

    The statement I asked you to execute on my system:
    Code:
    henk@boven:~/test> ls | grep konto | od -x
    0000000 c36c 6eb6 6b65 6e6f 6f74 000a
    0000013
    henk@boven:~/test>
    Because of the endianness of the system, every pair of hex bytes must be switched. Thus the first character is 6c, which is l.
    The second and third byte here (I coloured them red) are b6 c3, which is what you see in the tabel in the link.

    What you also see in the tabel is the same characters à ¶ that you see. Thus the filename itself is correct encoded This means that the UTF-8 encoding is not used at some moment and instead the program tries/uses Latin-1.

    How is you environment ariable LANG set?
    Code:
    echo $LANG
    I did the following:

    Code:
    brahmavihara@linux-0xse:~> echo $LANG
    C.UTF-8
    brahmavihara@linux-0xse:~> ls | grep konto | od -x
    0000000 c36c 6eb6 6b65 6e6f 6f74 000a
    0000013
    I also tried to browse to the folder from the command line:

    Code:
    brahmavihara@linux-0xse:~> ls
    Desktop    Downloads     Music        Pictures  Temp         bin         public_html
    Databases.db                Documents  Folder views  Public    Templates  Videos     l??nekonto  rpmbuild
    brahmavihara@linux-0xse:~> cd l??nekonto
    brahmavihara@linux-0xse:~/lönekonto> ls
    ls: reading directory .: Structure needs cleaning
    Is that of any help?

Page 1 of 3 123 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •