cant open file w filenames containing scandinavian chars

Questions about applications and software
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
arbogast

cant open file w filenames containing scandinavian chars

Post by arbogast »

Hello.

As the title describes I'm having trouble opening certain files. In locale settings, my country/region setting is correct (norwegian), though I'm using english as first entry in preferred languages, norwegian as second.

I'd much prefer keeping english as the language that's used by KDE, programs etc. as this makes it easier to search the web when in trouble and still be able to open files with scandinavian characters.

I'm running 17.1 and would appreciate a helping hand with this.
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
arbogast

Re: cant open file w filenames containing scandinavian chars

Post by arbogast »

I hope it's OK that i bump this.

additional info: When running locale I get these errors:

Code: Select all

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_NO.UTF-8
LANGUAGE=en
LC_CTYPE="en_NO.UTF-8"                                                                  
LC_NUMERIC=en_NO.UTF-8                                                                  
LC_TIME=en_NO.UTF-8                                                                     
LC_COLLATE="en_NO.UTF-8"                                                                
LC_MONETARY=en_NO.UTF-8                                                                 
LC_MESSAGES="en_NO.UTF-8"                                                               
LC_PAPER=en_NO.UTF-8                                                                    
LC_NAME=en_NO.UTF-8                                                                     
LC_ADDRESS=en_NO.UTF-8                                                                  
LC_TELEPHONE=en_NO.UTF-8                                                                
LC_MEASUREMENT=en_NO.UTF-8                                                              
LC_IDENTIFICATION=en_NO.UTF-8                                                           
LC_ALL=                           
I did my locale settings in the gui, english for the interface and norwegian for date, numbers etc.

I din't know if this info helps, but I'd dearly love some assistance.
LindseyD.
Level 4
Level 4
Posts: 333
Joined: Fri Mar 26, 2010 12:35 pm

Re: cant open file w filenames containing scandinavian chars

Post by LindseyD. »

Hi arbogast:

Can you do anything with these files? Copy them, delete or rename them? I ask because I've had this problem with some filenames that contain diacritics. I've never figured out what caused some to be ok and others completely inacessible. For a while I had some success renaming them with renameutils (in the repositories) but even that didn't work for all of them.
Mint17 KDE
arbogast

Re: cant open file w filenames containing scandinavian chars

Post by arbogast »

Yes. I can download, copy, rename - which is the only solution right now, it seems.

I bit annoying - it would be much easier if I could just click the link and the files opened automatically.

(Very late reply to this post. Sorry!)
User avatar
Flemur
Level 20
Level 20
Posts: 10096
Joined: Mon Aug 20, 2012 9:41 pm
Location: Potemkin Village

Re: cant open file w filenames containing scandinavian chars

Post by Flemur »

How about posting an example of a filename that you can't open? (Just the name).

Edit: what type of file(s) are you trying to open with which program(s)?
Please edit your original post title to include [SOLVED] if/when it is solved!
Your data and OS are backed up....right?
LindseyD.
Level 4
Level 4
Posts: 333
Joined: Fri Mar 26, 2010 12:35 pm

Re: cant open file w filenames containing scandinavian chars

Post by LindseyD. »

Flemur wrote:How about posting an example of a filename that you can't open? (Just the name).

Edit: what type of file(s) are you trying to open with which program(s)?
I wish I could. But for the ones I couldn't rename, I kept getting a "file doesn't exist" message. Couldn't back them up. So eventually they disappeared on a clean install.

In terms of files, they were mostly .mp3 or .flac. Italian opera arias, so lots of ché and è. Some worked, some didn't. It might have been because they were or weren't UTF-8.
Mint17 KDE
User avatar
Flemur
Level 20
Level 20
Posts: 10096
Joined: Mon Aug 20, 2012 9:41 pm
Location: Potemkin Village

Re: cant open file w filenames containing scandinavian chars

Post by Flemur »

Couldn't back them up. So eventually they disappeared on a clean install.

Next time it happens, you might try a terminal to rename them:
$ rename 's/è/e/g' *
etc (that's changing è to e; g=global=everywhere in name).

Test to make sure it works (I copied the è char you posted here):
$ ls *txt
è.txt
$ rename 's/è/e/g' *.txt
$ ls *txt
e.txt
Please edit your original post title to include [SOLVED] if/when it is solved!
Your data and OS are backed up....right?
LindseyD.
Level 4
Level 4
Posts: 333
Joined: Fri Mar 26, 2010 12:35 pm

Re: cant open file w filenames containing scandinavian chars

Post by LindseyD. »

Ah, but I did try in a terminal, and every other way I could think of.

Files that I created myself, in Linux, were fine. I don't know about arbogast's situation, but I'll bet he didn't create his filenames either.

I can't recall now whether my files were downloaded from the web, ripped from CD or what. They could have come off an old Windows hard drive. If the problem had been consistent, it probably would have been easier to solve. This is why I think it had to do with what character encoding was used.

It was very strange. I could see the filenames in any way I wanted to list them--file manager or terminal. But as soon as I tried to access them in any way, I was told the file didn't exist. It's an obscure problem, and very difficult to track down, which is why I'm hoping this thread stays alive, for anyone else in the same situation.
Mint17 KDE
Locked

Return to “Software & Applications”