Page 1 of 2 12 LastLast
Results 1 to 10 of 14

Thread: Filename corruption with non-standard characters (cyrilluc, swedish) - Leads to damaged files

  1. #1

    Default Filename corruption with non-standard characters (cyrilluc, swedish) - Leads to damaged files

    Hi,

    I'm using LEAP 15 with KDE, I have this issue where files with foreign characters get displayed with ???? (See attachment), the problem is I cannot rename or otherwise modify these files, even deleting them results in an error saying the file does not exist (from dolphin). I had to use rm -rf to delete the folders and it's contents. The only thing I can imagine might be connected is issues I have with baloo file indexer. Here's an example of the issue.



    Thanks.

  2. #2

    Default Re: Filename corruption with non-standard characters (cyrilluc, swedish) - Leads to damaged files

    Quote Originally Posted by Quads View Post
    The only thing I can imagine might be connected is issues I have with baloo file indexer.
    Definitely not.

    It's rather a problem with the locale settings IMHO.

    What do you get when you run "locale" in Konsole or xterm inside your KDE user session?

  3. #3

    Default Re: Filename corruption with non-standard characters (cyrilluc, swedish) - Leads to damaged files

    Quote Originally Posted by wolfi323 View Post
    Definitely not.
    What do you get when you run "locale" in Konsole or xterm inside your KDE user session?
    Code:
    LANG=C
    LC_CTYPE="C"
    LC_NUMERIC="C"
    LC_TIME="C"
    LC_COLLATE="C"
    LC_MONETARY="C"
    LC_MESSAGES="C"
    LC_PAPER="C"
    LC_NAME="C"
    LC_ADDRESS="C"
    LC_TELEPHONE="C"
    LC_MEASUREMENT="C"
    LC_IDENTIFICATION="C"
    LC_ALL=

  4. #4

    Default AW: Re: Filename corruption with non-standard characters (cyrilluc, swedish) - Leads to damaged file

    Quote Originally Posted by Quads View Post
    Code:
    LANG=C
    LC_CTYPE="C"
    LC_NUMERIC="C"
    LC_TIME="C"
    LC_COLLATE="C"
    LC_MONETARY="C"
    LC_MESSAGES="C"
    LC_PAPER="C"
    LC_NAME="C"
    LC_ADDRESS="C"
    LC_TELEPHONE="C"
    LC_MEASUREMENT="C"
    LC_IDENTIFICATION="C"
    LC_ALL=
    Right, the "C" locale only supports 8bit ASCII but the filenames are encoded in UTF-8.

    Have a look into systemsettings5->Regional Settings->Formats and choose a proper region, or do that in YaST for systemwide configuration (will be overridden by Plasma for the user though if you ever changed it in systemsettings5).

  5. #5
    Join Date
    Jun 2008
    Location
    Netherlands
    Posts
    25,002

    Default Re: Filename corruption with non-standard characters (cyrilluc, swedish) - Leads to damaged files

    To me this looks very much like the locale for root, not for a normal user.
    Henk van Velden

  6. #6

    Default Re: Filename corruption with non-standard characters (cyrilluc, swedish) - Leads to damaged file

    Quote Originally Posted by hcvv View Post
    To me this looks very much like the locale for root, not for a normal user.
    There's absolutely no indication for or against this theory in the posted output.

  7. #7

    Post Re: Filename corruption with non-standard characters (cyrilluc, swedish) - Leads to damaged files

    Quote Originally Posted by wolfi323 View Post
    Right, the "C" locale only supports 8bit ASCII but the filenames are encoded in UTF-8.

    Have a look into systemsettings5->Regional Settings->Formats and choose a proper region, or do that in YaST for systemwide configuration (will be overridden by Plasma for the user though if you ever changed it in systemsettings5).
    Quote Originally Posted by hcvv View Post
    To me this looks very much like the locale for root, not for a normal user.
    It was set to Default, don't know how I've managed that, output now reads:

    Code:
    LANG=en_GB.US-ASCII
    LC_CTYPE="en_GB.US-ASCII"
    LC_NUMERIC="en_GB.US-ASCII"
    LC_TIME="en_GB.US-ASCII"
    LC_COLLATE="en_GB.US-ASCII"
    LC_MONETARY="en_GB.US-ASCII"
    LC_MESSAGES="en_GB.US-ASCII"
    LC_PAPER="en_GB.US-ASCII"
    LC_NAME="en_GB.US-ASCII"
    LC_ADDRESS="en_GB.US-ASCII"
    LC_TELEPHONE="en_GB.US-ASCII"
    LC_MEASUREMENT="en_GB.US-ASCII"
    LC_IDENTIFICATION="en_GB.US-ASCII"
    LC_ALL=
    The issue has been resolved. However, I get a message that:

    LC_CTYPE
    LC_MESSAGES
    LC_ALL


    Cannot be set to default locale, no such file or directory; is this a problem?
    Thanks for your replies either way, the problem is solved. Feel free to close the thread upon reply.

  8. #8

    Default Re: Filename corruption with non-standard characters (cyrilluc, swedish) - Leads to damaged file

    Quote Originally Posted by Quads View Post
    The issue has been resolved. However, I get a message that:

    LC_CTYPE
    LC_MESSAGES
    LC_ALL


    Cannot be set to default locale, no such file or directory; is this a problem?
    When/where do you get that message?

    It might indicate that the system-wide locale is set to an unknown one, causing a fallback to "C".
    Would explain why the problem occured in the first place. ("Default" in systemsettings5 means use the system default)

    What does the command "localectl" tell?

    Feel free to close the thread upon reply.
    We don't close threads here.
    Last edited by wolfi323; 22-Jun-2018 at 06:35.

  9. #9

    Default Re: Filename corruption with non-standard characters (cyrilluc, swedish) - Leads to damaged file

    Quote Originally Posted by wolfi323 View Post
    When/where do you get that message?

    It might indicate that the system-wide locale is set to an unknown one, causing a fallback to "C".
    Would explain why the problem occured in the first place. ("Default" in systemsettings5 means use the system default)



    What does the command "localectl" tell?

    We don't close threads here.
    I get that message when I run locale, after I changed the regional settings.

    localectl says
    Code:
       System Locale: LANG=en_US.UTF-8
           VC Keymap: us
          X11 Layout: us

  10. #10

    Default Re: Filename corruption with non-standard characters (cyrilluc, swedish) - Leads to damaged file

    Quote Originally Posted by Quads View Post
    I get that message when I run locale, after I changed the regional settings.
    Ok, I can reproduce it:
    Code:
    wolfi@linux-lf90:~> LANG=en_GB.US-ASCII locale
    locale: Cannot set LC_CTYPE to default locale: No such file or directory
    locale: Cannot set LC_MESSAGES to default locale: No such file or directory
    locale: Cannot set LC_ALL to default locale: No such file or directory
    LANG=en_GB.US-ASCII
    LC_CTYPE="en_GB.US-ASCII"
    LC_NUMERIC="en_GB.US-ASCII"
    LC_TIME="en_GB.US-ASCII"
    LC_COLLATE="en_GB.US-ASCII"
    LC_MONETARY="en_GB.US-ASCII"
    LC_MESSAGES="en_GB.US-ASCII"
    LC_PAPER="en_GB.US-ASCII"
    LC_NAME="en_GB.US-ASCII"
    LC_ADDRESS="en_GB.US-ASCII"
    LC_TELEPHONE="en_GB.US-ASCII"
    LC_MEASUREMENT="en_GB.US-ASCII"
    LC_IDENTIFICATION="en_GB.US-ASCII"
    LC_ALL=
    LANG=en_GB.UTF-8 works fine though, and should be preferred anyway.
    Code:
    wolfi@linux-lf90:~> LANG=en_GB.UTF-8 locale
    LANG=en_GB.UTF-8
    LC_CTYPE="en_GB.UTF-8"
    LC_NUMERIC="en_GB.UTF-8"
    LC_TIME="en_GB.UTF-8"
    LC_COLLATE="en_GB.UTF-8"
    LC_MONETARY="en_GB.UTF-8"
    LC_MESSAGES="en_GB.UTF-8"
    LC_PAPER="en_GB.UTF-8"
    LC_NAME="en_GB.UTF-8"
    LC_ADDRESS="en_GB.UTF-8"
    LC_TELEPHONE="en_GB.UTF-8"
    LC_MEASUREMENT="en_GB.UTF-8"
    LC_IDENTIFICATION="en_GB.UTF-8"
    LC_ALL=
    I suppose, systemsettings5 tries to conserve the US-ASCII/UTF-8 "setting" when you select a different region (and "C" uses US-ASCII...).

    I'm currently not sure how to best circumvent this in the GUI, but you can edit ~/.config/plasma-localerc and ~/.config/plasma-locale-settings.sh directly with a text editor (replace US-ASCII with UTF-8 in both files).

    localectl says
    Code:
       System Locale: LANG=en_US.UTF-8
           VC Keymap: us
          X11 Layout: us
    Hm, that actually looks fine. But then, the settings may be invalid and maybe localectl just displays "something nice" in that case.

    What's actually contained in /etc/locale.conf ?
    And what does "locale" say when you login (as user) in text mode?
    (press e.g. Ctrl+Alt+F1 to switch to a text mode console, you can switch back to graphics mode with Ctrl+Alt+F7)

Page 1 of 2 12 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
  •