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

Thread: Invalid encoding on file names

  1. #1
    Join Date
    Aug 2010
    Location
    Toronto
    Posts
    24

    Default Invalid encoding on file names

    Hi all,

    I'm having problems with files that have special characters, or non standard English characters, on my 11.3 install. I have a lot of files that have Portuguese language characters (like ç, â, ã, etc), however they all now have "(invalid encoding)" at the end of the file name, and the special character was substituted for a question mark.

    I'm able to use special characters to write texts (OpenOffice, gedit, browser), however not on files. And now I have noticed that some sites also have this problem.

    I'm attaching a few screenshots. My system language is set to english_us with UTF-8, however my environment shows different. My browser (chrome) is also set with Unicode-UTF8.

    This is how this thread shows for me - Image


    File list in Gnome - Image


    System Settings - Image


    Code:
    victor@opensuse:~> grep -v '^#' /etc/sysconfig/language | sed '/^ *$/d' ; set | grep -i lang ; grep -i lang .bashrc | grep -v '^#' ; grep -i lang .profile | grep -v '^#'
    INPUT_METHOD=""
    RC_LANG="en_US.UTF-8"
    RC_LC_ALL=""
    RC_LC_MESSAGES=""
    RC_LC_CTYPE=""
    RC_LC_COLLATE=""
    RC_LC_TIME=""
    RC_LC_NUMERIC=""
    RC_LC_MONETARY=""
    RC_LC_PAPER=""
    ROOT_USES_LANG="ctype"
    AUTO_DETECT_UTF8="no"
    INSTALLED_LANGUAGES="pt_BR,en_US"
    GDM_LANG=C
    LANG=C
    grep: .profile: No such file or directory
    Any help is appreciated.

    Thanks,

    Vic.
    Last edited by victorbrca; 23-May-2011 at 21:22. Reason: image links

  2. #2
    Join Date
    Jun 2008
    Location
    UTC+10
    Posts
    9,683
    Blog Entries
    4

    Default Re: Invalid encoding on file names

    You probably inherited those files from a release where Latin-1 was the charset and now the charset is UTF-8. There are some byte sequences in Latin-1 that are invalid in UTF-8. Just rename those files.

    Web pages is a different problem, it's due to the site not identifying the charset of the page correctly.

  3. #3
    Join Date
    Aug 2010
    Location
    Toronto
    Posts
    24

    Default Re: Invalid encoding on file names

    But I also have this problem when creating new files. That shouldn't be the case right?

  4. #4
    Join Date
    Feb 2009
    Location
    Spain
    Posts
    25,547

    Default Re: Invalid encoding on file names

    On 2011-05-24 20:36, victorbrca wrote:
    >
    > But I also have this problem when creating new files. That shouldn't be
    > the case right?


    On what filesystem? How is it mounted? Check the output of "mount" and post
    it here.

    --
    Cheers / Saludos,

    Carlos E. R.
    (from 11.2 x86_64 "Emerald" at Telcontar)

  5. #5
    Join Date
    Aug 2010
    Location
    Toronto
    Posts
    24

    Default Re: Invalid encoding on file names

    Either on NTFS of ext4 I get the same error:

    Code:
    /dev/disk/by-id/ata-WDC_WD5001AALS-00L3B2_WD-WCASY8531358-part5 swap                 swap       defaults              0 0
    /dev/disk/by-id/ata-WDC_WD5001AALS-00L3B2_WD-WCASY8531358-part6 /                    ext4       acl,user_xattr        1 1
    /dev/disk/by-id/ata-WDC_WD5001AALS-00L3B2_WD-WCASY8531358-part7 /home                ext4       defaults              1 2
    #/dev/disk/by-id/ata-WDC_WD10EADS-00L5B1_WD-WCAU47566382-part1 /media/movies        ext3       defaults              1 2
    /dev/disk/by-id/ata-ST3500630A_9QG4X821-part1 /media/photos        ntfs-3g    defaults,locale=en_US.UTF-8 0 0
    Image

  6. #6
    Join Date
    Feb 2009
    Location
    Spain
    Posts
    25,547

    Default Re: Invalid encoding on file names

    On 2011-05-25 04:36, victorbrca wrote:
    >
    > Either on NTFS of ext4 I get the same error:


    On NTFS there are other restrictions. there is a translation involved,
    depending on the fstab options used, and how the partition was formatted in
    windows.

    On ext4, no.


    > 'Image' (http://imagebin.org/154950)
    > [image: http://imagebin.org/index.php?mode=image&id=154950]



    No, try with the command "mv" on the command line. A GUI command is not an
    acceptable test.


    --
    Cheers / Saludos,

    Carlos E. R.
    (from 11.2 x86_64 "Emerald" at Telcontar)

  7. #7
    Join Date
    Aug 2010
    Location
    Toronto
    Posts
    24

    Default Re: Invalid encoding on file names

    I can move it and rename from the shell without error, however I see the following two behavious:

    1- I cannot type the special character within gnome-terminal; I have to paste it from somewhere else, like gedit
    2- It displays the special character with a question mark, however name completion (tab) shows the right character


    Code:
    victor@opensuse:~/Desktop> touch mendonça
    victor@opensuse:~/Desktop> ltr
    total 760K
    -rwxr-xr-x  1 victor users  234 2010-12-08 21:27 Windows.desktop*
    drwxr-xr-x  5 victor users 4.0K 2011-04-08 19:17 ToMove/
    drwxr-xr-x  9 victor users 4.0K 2011-05-11 14:25 Photos/
    drwxr-xr-x 12 victor users 4.0K 2011-05-23 19:18 Temp/
    -rw-r--r--  1 victor users 715K 2011-05-24 21:42 Screenshot-Speed Dial - Google Chrome.png
    -rw-------  1 victor users  26K 2011-05-24 21:42 bookmrxs
    -rw-r--r--  1 victor users    0 2011-05-25 15:46 mendon?a
    victor@opensuse:~/Desktop> rm mendonça ## mame completion used here
    victor@opensuse:~/Desktop> ltr
    total 760K
    -rwxr-xr-x  1 victor users  234 2010-12-08 21:27 Windows.desktop*
    drwxr-xr-x  5 victor users 4.0K 2011-04-08 19:17 ToMove/
    drwxr-xr-x  9 victor users 4.0K 2011-05-11 14:25 Photos/
    drwxr-xr-x 12 victor users 4.0K 2011-05-23 19:18 Temp/
    -rw-r--r--  1 victor users 715K 2011-05-24 21:42 Screenshot-Speed Dial - Google Chrome.png
    -rw-------  1 victor users  26K 2011-05-24 21:42 bookmrxs

  8. #8
    Join Date
    Feb 2009
    Location
    Spain
    Posts
    25,547

    Default Re: Invalid encoding on file names

    On 2011-05-25 22:06, victorbrca wrote:
    >
    > I can move it and rename from the shell without error, however I see the
    > following two behavious:


    Ok, so that means the filesystem is alright. You have problems with the
    user interface.


    > 1- I cannot type the special character within gnome-terminal; I have to
    > paste it from somewhere else, like gedit
    > 2- It displays the special character with a question mark, however name
    > completion (tab) shows the right character


    Interesting.

    What is the output of the command 'locale'? Paste it here.

    I just tried to type the same filename as you in my gnome-terminal: no
    problem. I have the US locale, though (actually, a mixture of US and ES
    locales).

    Gnome uses the same locale as the CLI, so it is important it is correctly set.


    I'm also testing another user with the es_ES locale [...] No problems in
    gnome-terminal.

    --
    Cheers / Saludos,

    Carlos E. R.
    (from 11.2 x86_64 "Emerald" at Telcontar)

  9. #9
    Join Date
    Aug 2010
    Location
    Toronto
    Posts
    24

    Default Re: Invalid encoding on file names

    I was thinking it's a discrepancy somewhere within my system variables... Look at the diffence between two outputs:

    Code:
    victor@opensuse:~> grep -v '^#' /etc/sysconfig/language | sed '/^ *$/d'
    INPUT_METHOD=""
    RC_LANG="en_US.UTF-8"
    RC_LC_ALL=""
    RC_LC_MESSAGES=""
    RC_LC_CTYPE=""
    RC_LC_COLLATE=""
    RC_LC_TIME=""
    RC_LC_NUMERIC=""
    RC_LC_MONETARY=""
    RC_LC_PAPER=""
    ROOT_USES_LANG="ctype"
    AUTO_DETECT_UTF8="no"
    INSTALLED_LANGUAGES="pt_BR,en_US"
    Code:
    victor@opensuse:~> locale
    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=

  10. #10
    Join Date
    Aug 2010
    Location
    Toronto
    Posts
    24

    Default Re: Invalid encoding on file names

    Tried changing it to "en_US.UTF-8" and creating a folder, shell automatically substituted "ç" for a "?" as I typed it:

    Code:
    victor@opensuse:~/Desktop> echo $LANG
    C
    victor@opensuse:~/Desktop> LANG="en_US.UTF-8"
    victor@opensuse:~/Desktop> echo $LANG
    en_US.UTF-8
    victor@opensuse:~/Desktop> locale
    LANG=en_US.UTF-8
    LC_CTYPE="en_US.UTF-8"
    LC_NUMERIC="en_US.UTF-8"
    LC_TIME="en_US.UTF-8"
    LC_COLLATE="en_US.UTF-8"
    LC_MONETARY="en_US.UTF-8"
    LC_MESSAGES="en_US.UTF-8"
    LC_PAPER="en_US.UTF-8"
    LC_NAME="en_US.UTF-8"
    LC_ADDRESS="en_US.UTF-8"
    LC_TELEPHONE="en_US.UTF-8"
    LC_MEASUREMENT="en_US.UTF-8"
    LC_IDENTIFICATION="en_US.UTF-8"
    LC_ALL=
    victor@opensuse:~/Desktop> mkdir mendon?a

    Tried setting GDM_LANG and then running nautilus and repeating test (create new folder named "mendonça")... same issue.

    Code:
    victor@opensuse:~/Desktop> set | grep -i lang
    GDM_LANG=C
    LANG=en_US.UTF-8
    victor@opensuse:~/Desktop> GDM_LANG="en_US.UTF-8"
    victor@opensuse:~/Desktop> export GDM_LANG
    victor@opensuse:~/Desktop> nautilus

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
  •