Bug 402532 - Can't open fits file with accented character
Summary: Can't open fits file with accented character
Status: RESOLVED WORKSFORME
Alias: None
Product: kstars
Classification: Applications
Component: general (other bugs)
Version First Reported In: 3.0.0
Platform: Mint (Debian based) Linux
: NOR normal
Target Milestone: ---
Assignee: Jasem Mutlaq
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-12-24 14:44 UTC by Sebastien
Modified: 2021-09-13 07:59 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Sebastien 2018-12-24 14:44:58 UTC
SUMMARY
Kstars refuse to open fits file with path containing accented characters

STEPS TO REPRODUCE
1. Just open fits file within kstars
2. 
3. 

OBSERVED RESULT
FITSIO status = 104: could not open the named file
failed to find or open the following file: (ffopen)
/home/seb/T�l�chargements/new-image.fits
org.kde.kstars.fits: "Could not open file /home/seb/Téléchargements/new-image.fits. Error could not open the named file"


EXPECTED RESULT


SOFTWARE/OS VERSIONS
Windows: - 
MacOS: -
Linux/KDE Plasma: Linux Mint 19 Cinnamon
(available in About System)
KDE Plasma Version: -
KDE Frameworks Version: 5.44.0
Qt Version: 5.9.5

ADDITIONAL INFORMATION
Comment 1 Christoph Feck 2018-12-24 14:48:54 UTC
Is the filename UTF-8 encoded? Check 'convmv'.
Comment 2 Sebastien 2018-12-24 15:11:12 UTC
(In reply to Christoph Feck from comment #1)
> Is the filename UTF-8 encoded? Check 'convmv'.

I don't know. I'm using Linux Mint 19 as is. I installed convmv. What test do you want me to make ?
Comment 3 Christoph Feck 2018-12-25 03:23:22 UTC
Please try:

cd /home/seb/
LC_CTYPE=C ls -b T*chargements

and paste the output here.
Comment 4 Sebastien 2018-12-25 10:59:26 UTC
And voila

seb@seb-HP-ENVY-15-Notebook-PC:~$ cd /home/seb/
seb@seb-HP-ENVY-15-Notebook-PC:~$ LC_CTYPE=C ls -b T*l*chargements
3D\ Project							       memo_exoplanete_version1.pdf
new-image.fits                                                         Astro_ATACAMA_C2015V2_Seb_20181122_24.cfg			       org.remmina.Remmina.flatpakref                                         Photos
Cmunipack_2.1.24-1_amd64.deb					       pretraitement_Drizzle_Localnorm\ (1).xpsm
pretraitement_Kizilian_Drizzle_Localnorm.xpsm                          events_select.php						       
GOES16-c11.gif							       Tutos                                                                  Imprimante\ 3D
Comment 5 Christoph Feck 2018-12-25 14:28:26 UTC
Oh, I forgot that ls will list the contents of the directory, not its name. Try:

LC_CTYPE=C ls -b -d T*chargements
Comment 6 Sebastien 2018-12-25 20:44:25 UTC
I was wondering why this particular command ^^.
This time, the command returns :

T\303\251l\303\251chargements
Comment 7 Christoph Feck 2018-12-26 02:38:47 UTC
Okey, this is UTF-8, so it should work. I am out of ideas, because I don't know the cfits library. Thanks for the investigation so far.
Comment 8 Sebastien 2018-12-26 12:02:19 UTC
(In reply to Christoph Feck from comment #7)
> Okey, this is UTF-8, so it should work. I am out of ideas, because I don't
> know the cfits library. Thanks for the investigation so far.

What is sure, is the relation with special character in the path. If I move the same image in /home/seb for exemple, it works perfectly.
Comment 9 Jasem Mutlaq 2021-09-13 07:59:07 UTC
Cannot reproduce with 3.5.5 using the exact name Téléchargements as the directory.