You are not logged in.

#1 2013-11-30 20:02:04

Humble_Panda
Member
Registered: 2013-04-30
Posts: 32

Persistent "invalid encoding" issue (Spanish accents)

Hi all,

I have been experiencing some issues with the encoding of several files (mp3 songs, documents, and so on). The problem is that music players, terminal emulators, and Thunar cannot properly display Spanish accents---although I can type them just fine by setting:

setxkbmap es

I have read tons of threads on this issue and yet I have gotten nothing right. I have also tried to change my "locale" but it does not seem to work...

My locale output is:

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.UTF-8:es_ES.UTF-8
LC_CTYPE="en_GB.UTF-8:es_ES.UTF-8"
LC_NUMERIC="en_GB.UTF-8:es_ES.UTF-8"
LC_TIME="en_GB.UTF-8:es_ES.UTF-8"
LC_COLLATE=C
LC_MONETARY="en_GB.UTF-8:es_ES.UTF-8"
LC_MESSAGES="en_GB.UTF-8:es_ES.UTF-8"
LC_PAPER="en_GB.UTF-8:es_ES.UTF-8"
LC_NAME="en_GB.UTF-8:es_ES.UTF-8"
LC_ADDRESS="en_GB.UTF-8:es_ES.UTF-8"
LC_TELEPHONE="en_GB.UTF-8:es_ES.UTF-8"
LC_MEASUREMENT="en_GB.UTF-8:es_ES.UTF-8"
LC_IDENTIFICATION="en_GB.UTF-8:es_ES.UTF-8"
LC_ALL=

My /etc/locale.conf is set to:

LANG="en_GB.UTF-8:es_ES.UTF-8"
LANGUAGE="en_GB.UTF-8:es_ES.UTF-8"
LC_COLLATE="C"
LC_ALL="en_GB.UTF-8:es_ES.UTF-8"

Also I have uncommented the above languages in /etc/locale.gen

The problem is that I cannot display Spanish accents (and read files), but I can type in Spanish just fine. Any thoughts would be very much appreciated smile

Thanks!

Offline

#2 2013-11-30 20:13:38

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: Persistent "invalid encoding" issue (Spanish accents)

Try just 'en_GB.UTF-8' or 'es_ES.UTF-8' and see if it works.

Offline

#3 2013-11-30 20:46:44

Humble_Panda
Member
Registered: 2013-04-30
Posts: 32

Re: Persistent "invalid encoding" issue (Spanish accents)

karol wrote:

Try just 'en_GB.UTF-8' or 'es_ES.UTF-8' and see if it works.

Thanks for your reply. I removed "es_ES.UTF-8" from my /etc/locale.conf but the problem persists :S

Offline

#4 2013-11-30 20:57:05

Humble_Panda
Member
Registered: 2013-04-30
Posts: 32

Re: Persistent "invalid encoding" issue (Spanish accents)

Sorry for double-posting, but I think I have found the source of the problem.

The directories, files, and so on that cannot be properly displayed had been created in Windows 7, and they are now in a shared partition (FAT32 I believe). May this be the problem? How could I encode these files into a more Linux-friendly way?

Thanks!

Offline

#5 2013-11-30 21:02:06

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: Persistent "invalid encoding" issue (Spanish accents)

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

means you have some problems on Linux too.
What's the output of 'locale', 'locale -a' and 'localectl'?

Offline

#6 2013-11-30 21:14:59

Humble_Panda
Member
Registered: 2013-04-30
Posts: 32

Re: Persistent "invalid encoding" issue (Spanish accents)

Yup, I noticed those errors too... But couldn't find a way around them...

Some outputs. For locale: (the previous errors are gone now, I guess it's due to the change I made in /etc/locale.conf

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=C
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=

Locale -a throws:

C
POSIX
el_GR.utf8
en_GB.utf8
es_ES.utf8
ja_JP.utf8

And localectl:

System Locale: LANG=en_GB.UTF-8
                  LC_COLLATE=C
       VC Keymap: uk
      X11 Layout: n/a

Of course I know that by "renaming" each folder/file the problem is solved... But I have tons of music and renaming everything would be such a tremendous pain in the neck... Thanks for your help guys!!

Last edited by Humble_Panda (2013-11-30 21:16:34)

Offline

#7 2013-11-30 21:17:27

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: Persistent "invalid encoding" issue (Spanish accents)

I wanted to make sure the Linux part is solved.

Where are these Windows files and directories? Did you copy them over or are they mounted on a fat32 or ntfs-formatted drive?

Offline

#8 2013-11-30 21:21:04

Humble_Panda
Member
Registered: 2013-04-30
Posts: 32

Re: Persistent "invalid encoding" issue (Spanish accents)

All these files are in a shared partition (FAT32) I have for Windows 7 and Arch Linux in my HD. I have already tried changing the names from Arch Linux and it works just fine, but you can imagine how cumbersome is going to be if I have to rename everything, LOL

Thanks!

Offline

#9 2013-12-02 04:59:18

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: Persistent "invalid encoding" issue (Spanish accents)

What mount options are you using for that FAT32 partition?


Sorry for the late reply but I didn't get a notification about your last post.

Offline

#10 2013-12-02 05:07:50

Humble_Panda
Member
Registered: 2013-04-30
Posts: 32

Re: Persistent "invalid encoding" issue (Spanish accents)

Well, interestingly I don't have anything in /etc/fstab (I don't actually know whether this is ok).

lsblk -f throws the following:

NAME   FSTYPE LABEL   UUID                                 MOUNTPOINT
sda                                                        
├─sda1 ntfs   SYSTEM  2C485FF1485FB7F2                     
├─sda2 ntfs   WINDOWS 4032656F32656B3C                     
├─sda3 ext4           9dbb5918-2b90-416c-90a9-0a19edd5ae69 /boot
├─sda4                                                     
├─sda5 ext4           5067ce29-884e-4e0f-80b7-ee0983c96dda /
├─sda6 vfat           E955-E796                            /media/share
└─sda7 swap           0af913c4-6aca-47f6-963f-45396d428f33 [SWAP]
sr0                  

Hope that helps smile

Offline

#11 2013-12-02 05:10:52

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: Persistent "invalid encoding" issue (Spanish accents)

Use 'mount'. 'mount -t vfat' should declutter the output and show just the fat32 partitions.

Offline

#12 2013-12-02 05:16:05

Humble_Panda
Member
Registered: 2013-04-30
Posts: 32

Re: Persistent "invalid encoding" issue (Spanish accents)

Alright, 'mount -t vfat' throws:

/dev/sda6 on /media/share type vfat (rw,nosuid,nodev,noexec,relatime,fmask=0111,dmask=0000,allow_utime=0022,codepage=437,iocharset=iso8859-1,shortname=mixed,errors=remount-ro,user)

Offline

#13 2013-12-02 18:26:14

Humble_Panda
Member
Registered: 2013-04-30
Posts: 32

Re: Persistent "invalid encoding" issue (Spanish accents)

[EDIT] First of all, I am sorry for double posting. I have just noticed that my vfat partition is not mounted with isocharset=utf8. How could I exactly change this without messing around with the files in that partition? I am completely new to "fstab", tongue

I have been trying to get a way around this issue, but all my attempts failed. I do not see anything wrong with the way in which my FAT32 partition is mounted (do you?).

As a last resort, I also uncommented in /etc/locale.gen the "ISO-" for Spanish, but Thunar keeps giving me a hard time sad

Things get worse when Thunar decides to stop working whenever I click on a "invalid-encoding file", meaning that I cannot even go to "Properties" or "Rename" from Thunar (and have to do it via console). I do not know as to why this is happening (it is not like this all the time, just when Thunar decides to break my b*lls, haha). Any thoughts?

Thanks!!! big_smile

Last edited by Humble_Panda (2013-12-02 18:33:09)

Offline

Board footer

Powered by FluxBB