You are not logged in.

#1 2012-09-16 08:08:19

Wasser
Member
Registered: 2011-07-06
Posts: 23

[SOLVED] File name encoding issue

Hi all,

I have a large series of files with accented characters, they were all displayed nicely, but at some point, when I copied them to another computer, the characters were replaced by codes, for instance: "ó" --> "ó".


+Renaming ie. "Pasó" (bad encoding of "Pasó") --> Pasó, while writing it, it shows the correct character, but when pressing enter the name remains ("Pasó")

+If I rename the file to something else and then to the correct name, it will accept it: Pasó --> Pas --> Pasó will display correctly.


I don't know if it's a system wide encoding issue because new files are displayed correctly, but I would like to know if I have to change file names manually to make them right.

PS. When copying bad encoded files to another FS (like a USB drive), nautilus and bash refuse to copy them.

Last edited by Wasser (2012-09-17 21:10:52)

Offline

#2 2012-09-16 08:30:02

DSpider
Member
From: Romania
Registered: 2009-08-23
Posts: 2,273

Re: [SOLVED] File name encoding issue

How are you mounting it? Post your fstab (/etc/fstab).


"How to Succeed with Linux"

I have made a personal commitment not to reply in topics that start with a lowercase letter. Proper grammar and punctuation is a sign of respect, and if you do not show any, you will NOT receive any help (at least not from me).

Offline

#3 2012-09-16 08:37:06

Wasser
Member
Registered: 2011-07-06
Posts: 23

Re: [SOLVED] File name encoding issue

My fstab:

# 
# /etc/fstab: static file system information
#
# <file system>	<dir>	<type>	<options>	<dump>	<pass>
tmpfs		/tmp	tmpfs	nodev,nosuid	0	0
# /dev/sda2 LABEL=ROOT
UUID=d2243d9c-b8e7-442a-8446-5a43a4d9221b	/         	ext4      	rw,relatime,data=ordered	0 1

# /dev/sda5 LABEL=HOME
UUID=e67f5cfa-3ec3-4c06-9c2c-62c4cc188ffe	/home     	ext4      	rw,relatime,data=ordered	0 2

# /dev/sda3 LABEL=VAR
UUID=caac4924-2a13-4c97-9926-668ac0595ba3	/var      	reiserfs  	rw,relatime	0 2

# /dev/sda1 LABEL=UEFI
UUID=1E70-6485      	/boot/efi 	vfat      	rw,relatime,fmask=0022,dmask=0022,iocharset=iso8859-1,shortname=mixed,errors=remount-ro	0 2

# /dev/sda4
UUID=14993c2e-4bc4-42e4-b2e5-9dbc286abb4c	none      	swap      	defaults  	0 0

Files in question are in /dev/sda5 (HOME)

Last edited by Wasser (2012-09-16 08:37:52)

Offline

#4 2012-09-16 09:58:10

DSpider
Member
From: Romania
Registered: 2009-08-23
Posts: 2,273

Re: [SOLVED] File name encoding issue

Post the output of:

$ locale
$ locale -a

"How to Succeed with Linux"

I have made a personal commitment not to reply in topics that start with a lowercase letter. Proper grammar and punctuation is a sign of respect, and if you do not show any, you will NOT receive any help (at least not from me).

Offline

#5 2012-09-16 11:56:45

thisoldman
Member
From: Pittsburgh
Registered: 2009-04-25
Posts: 1,172

Re: [SOLVED] File name encoding issue

Be careful with this, I didn't have any files to be able to run good tests:

$ touch Pasó
$ ls
Pasó

$ convmv -f UTF-8 -t iso-8859-1 Pasó
Starting a dry run without changes...
mv "./Pasó"	"./Pasó"
No changes to your files done. Use --notest to finally rename the files.
$ ls
Pasó

$ convmv --notest -f UTF-8 -t iso-8859-1 Pasó
mv "./Pasó"	"./Pasó"
Ready!
$ ls
Pasó

convmv only converts the encodings of the filenames, not the file contents.  It's in the extra repo.

Edited to fix typo

Last edited by thisoldman (2012-09-16 12:04:52)

Offline

#6 2012-09-17 21:10:09

Wasser
Member
Registered: 2011-07-06
Posts: 23

Re: [SOLVED] File name encoding issue

thisoldman wrote:

convmv only converts the encodings of the filenames, not the file contents.  It's in the extra repo.

Thanks!
Actually, it seems that at some point I changed to ISO-8559, now I went back to UTF-8 but, as expected, files created while using ISO-8559 needed to be changed, now everything is fixed big_smile


Thanks again

Offline

Board footer

Powered by FluxBB