You are not logged in.

#1 2012-02-18 22:16:08

Lockheed
Member
Registered: 2010-03-16
Posts: 1,550

utf8 issues in some apps

I want to enable utf8 on my ext4 partition. Why. you might ask? Here's an example:

$ dir
-\ Ministry\ Of\ Sound\ -\ Chilled\ 1991-2008\ Disc\ 1.log
-\ Ministry\ Of\ Sound\ -\ Chilled\ 1991-2008\ Disc\ 1.m3u
13\ -\ Tim\ Love\ Lee\ -\ One\ Night\ Samba.mp3
14\ -\ The\ Karminsky\ Experience\ Inc\ -\ Exploration.mp3

Files like this cannot be written to, and rarely read.

Right now my fstab has this partition set on 'defaults'. I know that ext4 is supposed to come with utf8 enabled, but it does not seem to be. If I add utf8 option to the mount line in fstab, the partition mounts in read-only mode and the system doesn't boot up.

So, how can I solve this?

Last edited by Lockheed (2012-02-20 08:50:22)

Offline

#2 2012-02-18 22:31:16

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

Re: utf8 issues in some apps

Using spaces in file- or directory names means trouble, but

[karol@black Greatest Hits, Vol. 3]$ ls
01 The Show Must Go On.mp3
02 Under Pressure.mp3
03 Barcelona.mp3
04 Too Much Love Will Kill You.mp3
05 Somebody to Love.mp3
06 You Don't Fool Me.mp3
07 Heaven for Everyone.mp3
08 Las Palabras de Amor (The Words of Love).mp3
09 Driven by You.mp3
10 Living on My Own.mp3
11 Let Me Live.mp3
12 The Great Pretender.mp3
13 Princes of the Universe.mp3
14 Another One Bites the Dust.mp3
15 No One But You (Only the Good Die Young).mp3
16 These Are the Days of Our Lives.mp3
17 Thank God It's Christmas.mp3

looks nice.

I can read and write files with spaces in their path using backslashes to escape the spaces (or other "bad" characters, like '(' or ')'.

Offline

#3 2012-02-18 22:40:53

Lockheed
Member
Registered: 2010-03-16
Posts: 1,550

Re: utf8 issues in some apps

It is not about spaces. Looks like forum removed those strange ASCI characters from my first post. Let's try again:

13\ -\ Tim\ Love\ Lee\ -\ One\ Night\ Samba.mp3

EDIT:
Damn it. Anyway, there are three white question marks in black squares on each side of Tim Love.

Last edited by Lockheed (2012-02-18 22:42:26)

Offline

#4 2012-02-18 23:06:33

Lockheed
Member
Registered: 2010-03-16
Posts: 1,550

Re: utf8 issues in some apps

Here's an example of the issue in three different forms:
http://tinyurl.com/7kdg5r4

Offline

#5 2012-02-18 23:21:21

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

Re: utf8 issues in some apps

Were those supposed to be curly quotes or something? Because they're obviously not in the Unicode table. Heck, even Japanese characters show up fine here.


"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

#6 2012-02-18 23:22:32

Lockheed
Member
Registered: 2010-03-16
Posts: 1,550

Re: utf8 issues in some apps

Don't know, but I did a little test and created a folder name using only special Polish characters - the result was a folder named "???????????????"

Offline

#7 2012-02-18 23:28:07

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

Re: utf8 issues in some apps

I'm using Polish accented characters from time to time and I've never had any problems, neither on ext3 nor on ext4.
I'm using urxvt:

[karol@black foo1]$ mkdir aąbcćdęf
[karol@black foo1]$ ls
aąbcćdęf

Post your mount options, fstab etc.

Offline

#8 2012-02-18 23:28:13

djgera
Developer
From: Buenos Aires - Argentina
Registered: 2008-12-24
Posts: 723
Website

Re: utf8 issues in some apps

The extfs does not care about filenames charset. Is the locale of the application what matters. If you have filenames with other locales just convert to your system/user locale (UTF8 in your case) using convmv[#1]

[#1] http://www.archlinux.org/packages/extra/any/convmv/

Offline

#9 2012-02-18 23:37:46

Lockheed
Member
Registered: 2010-03-16
Posts: 1,550

Re: utf8 issues in some apps

/dev/sda1 /mnt/Disk_D  ext4 defaults 0 2
]$ locale
LANG=pl_PL.UTF-8
LC_CTYPE=en_GB.UTF-8
LC_NUMERIC=en_GB.UTF-8
LC_TIME=pl_PL.UTF-8
LC_COLLATE=C
LC_MONETARY=en_GB.UTF-8
LC_MESSAGES=en_GB.UTF-8
LC_PAPER="pl_PL.UTF-8"
LC_NAME="pl_PL.UTF-8"
LC_ADDRESS="pl_PL.UTF-8"
LC_TELEPHONE="pl_PL.UTF-8"
LC_MEASUREMENT=pl_PL.UTF-8
LC_IDENTIFICATION="pl_PL.UTF-8"
LC_ALL=

djgera, I don't think it has anything to do with filenames locale because even folders created on my system are not displayed properly.

But here's a new discovery. If I create a folder with Krusader, it is all screwed up, but if I use the same characters in pcmanfm, the folder name is created perfectly fine. Most of the files I have provblems with are created by Nicotine.

Last edited by Lockheed (2012-02-18 23:43:29)

Offline

#10 2012-02-19 00:00:49

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

Re: utf8 issues in some apps

Sounds like a font problem.  The fonts you use perhaps don't contain the glyph for the character in the filename.  If the font you're using for display doesn't include that glyph, you can get "U+FFFD" or somthing undefined. (This doesn't rule out a locale problem).

convmv, from extra, can convert filenames from one encoding to another if you know the original encoding of the filename:

$ convmv --notest -f iso-8859-1 -t utf-8 File\ Name.mp3

I always rename files to linux-friendly forms with perl-rename or a batch file modeled after one by pbrisbin, https://bbs.archlinux.org/viewtopic.php … 48#p789148.  There's a gui for perl-rename, gprename which works well.

Offline

#11 2012-02-19 07:21:35

Lockheed
Member
Registered: 2010-03-16
Posts: 1,550

Re: utf8 issues in some apps

Again, I don't think it is font problem, because it affects fonts that should support those characters, like in gnome terminal. Here is what happened after I changed system-wide locale to pl_PL.UTF8

$ sudo geany /etc/locale.gen
Has??o:

Last edited by Lockheed (2012-02-19 07:21:49)

Offline

#12 2012-02-19 07:35:47

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

Re: utf8 issues in some apps

What fonts are you using?

Offline

#13 2012-02-19 08:27:17

Lockheed
Member
Registered: 2010-03-16
Posts: 1,550

Re: utf8 issues in some apps

Monospace in the terminal.

Offline

#14 2012-02-19 10:44:31

bohoomil
Banned
Registered: 2010-09-04
Posts: 2,377
Website

Re: utf8 issues in some apps

Monospace is an alias. Run

fc-cache monospace

to get the actual font name.

Edit: More than a font you're using--this should be fine as the vast majority of TTFs offer satisfying number of glyphs to display Central/Western European languages--I wonder if you aren't using conflicting DE parts that use their own language/session settings...

Last edited by bohoomil (2012-02-19 11:33:42)


:: Registered Linux User No. 223384

:: github
:: infinality-bundle+fonts: good looking fonts made easy

Offline

#15 2012-02-19 11:13:47

Lockheed
Member
Registered: 2010-03-16
Posts: 1,550

Re: utf8 issues in some apps

This command returns no output.

Your hypothesis is quite likely as I am running stripped down XFCE with compiz and pcmanfm as desktop manager.

Offline

#16 2012-02-19 12:00:17

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

Re: utf8 issues in some apps

Are the characters that display incorrectly in the 'One Night Samba' filename Polish quotation marks?  (These take three hex-digits when they are encoded as UTF-8).  With fc-match returning nothing, I suspect you aren't allowing the glyphs to be available.

You may have stripped down the installation too much.  The cure might be to install or reinstall the DejaVu fonts, 'extra/ttf-dejavu', and all the dependencies that might pop up.

With no intent to complete the removal, I just tried 'pacman -R ttf-dejavu' and find mplayer and chromium require that font package.  That's odd.

Offline

#17 2012-02-19 12:04:54

Lockheed
Member
Registered: 2010-03-16
Posts: 1,550

Re: utf8 issues in some apps

thisoldman wrote:

Are the characters that display incorrectly in the 'One Night Samba' filename Polish quotation marks?

I doubt it. More likely something Portuguese or Spanish, if quotations at all.

But as you could see above, I get the same error if I change terminal language to Polish and try sudo command. The 'password' word in Polish is 'hasło', and what terminal shows is 'has??o'.

I thing the straightest way to the solution is focusing on an example of Krusader.

If I create a folder named "óąćżżłćę" in PCmanFM, it is being displayed in Krusader properly.
But if I create the same folder in Krusader, it is being displayed as '???????????' in both Krusader and PCmanFM.

Last edited by Lockheed (2012-02-19 12:09:19)

Offline

#18 2012-02-19 14:17:33

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

Re: utf8 issues in some apps

That is puzzling.  If you copy the '???????????', say from a 'rename file' text box, and paste it into a text editor, does it revert to the correct characters?  Arch's xterm won't display CJKV characters without some fiddling, but if I paste the displayed open rectangles from xterm into other apps, the other apps display the glyphs correctly.

I did a quick installation of pcmanfm.  I could then create the 'óąćżżłćę' directory using any one of pcmanfm, xterm, emelfm2 or rxvt-unicode, and the other apps all display the characters correctly.  LANG=en_US.UTF-8

I'm wondering what non-explicit dependency, beside a crippled fontconfig, you may be missing.  Do you have 'intltool' and 'perl-xml-parser' installed?

Last edited by thisoldman (2012-02-19 14:21:41)

Offline

#19 2012-02-19 17:36:19

Lockheed
Member
Registered: 2010-03-16
Posts: 1,550

Re: utf8 issues in some apps

Knock on wood, it looks like I solved it. I am just not sure which of the steps helped.

1. I commented out all the broken-down language settings in /etc/profile.d/_locales.sh. It is now virtually blank from the setting point of view. I used to mix GB and PL settings there, because I could not stand US date format, but turned out GB utf still has it the dd/mm/yy way.

2. I put LANG="en_GB.UTF-8" in /etc/environment

Et voila - Konqueror works fine. Now I will just need to see how it goes with other programs.

Offline

#20 2012-02-19 17:51:38

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

Re: utf8 issues in some apps

Don't forget to mark the topic as [SOLVED].

...even tho it's not related to fstab, ext4 or utf-8... My /etc/environment file only contains comments, and I don't have any problem with special characters or otherwise:

#
# This file is parsed by pam_env module
#
# Syntax: simple "KEY=VAL" pairs on separate lines
#

Must be a KDE thing. I use Openbox.

Last edited by DSpider (2012-02-19 17:52:40)


"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

#21 2012-02-20 08:49:51

Lockheed
Member
Registered: 2010-03-16
Posts: 1,550

Re: utf8 issues in some apps

I still have this problem, just no it seems to be restricted to nicotine. Have a look:
http://tinyurl.com/88mqfev

Offline

Board footer

Powered by FluxBB