Image converting does not work if path does contain non-English letters
Moderators: XnTriq, helmut, xnview
-
- Posts: 7
- Joined: Fri Jul 14, 2023 4:04 pm
Image converting does not work if path does contain non-English letters
If file "filelist.txt" contains paths with letters other than English, such as Chinese or Arabic, like "D:\files\习近平.jpg", the convertation of images, located on these paths, will not work.
XnConvert has a similar problem; such images are not loaded into preview window and do not participate in convertation.
XnViewMP handles such paths normally and converting happens!
Is it possible to add support for such letters in Nconvert and XnConvert as well?
Nconvert: 7.136
XnConvert: 1.98
System: Windows 10 x64, en.
XnConvert has a similar problem; such images are not loaded into preview window and do not participate in convertation.
XnViewMP handles such paths normally and converting happens!
Is it possible to add support for such letters in Nconvert and XnConvert as well?
Nconvert: 7.136
XnConvert: 1.98
System: Windows 10 x64, en.
-
- XnThusiast
- Posts: 4132
- Joined: Sun Apr 29, 2012 9:45 am
- Location: Cheltenham, U.K.
Re: Image converting does not work if path does contain non-English letters
Pierre was developing an NConvert version with better Unicode support earlier in the year, but unfortunately the link to the test version that he produced, which was reported to work for Korean characters, is no longer available...
Maybe in the next update?
Maybe in the next update?
-
- Author of XnView
- Posts: 44451
- Joined: Mon Oct 13, 2003 7:31 am
- Location: France
Re: Image converting does not work if path does contain non-English letters
you can try the unicode beta version
Pierre.
-
- Posts: 7
- Joined: Fri Jul 14, 2023 4:04 pm
Re: Image converting does not work if path does contain non-English letters
I tried beta version, but I get error again.
File filelist.txt:
Command:
Result:
File filelist.txt:
Code: Select all
D:\file 1.png
D:\file روز.png
Code: Select all
nconvert.exe -l filelist.txt -q 90 -D -out webp
Code: Select all
Conversion of D:\file 1.png into D:\file 1.webp OK
Error: Can't open file (D:\file روز.png)
-
- XnThusiast
- Posts: 4132
- Joined: Sun Apr 29, 2012 9:45 am
- Location: Cheltenham, U.K.
Re: Image converting does not work if path does contain non-English letters
If you don't use a filelist and run something like this:
?
Code: Select all
nconvert.exe -q 90 -D -out webp روز.png
-
- Posts: 7
- Joined: Fri Jul 14, 2023 4:04 pm
Re: Image converting does not work if path does contain non-English letters
In this case, conversion works, although it outputs question marks instead of file name in Terminal:
In file system the file is written with a normal name: روز.webp
Code: Select all
>nconvert.exe -out webp روز.png
Conversion of ???.png into ???.webp OK
-
- XnThusiast
- Posts: 4132
- Joined: Sun Apr 29, 2012 9:45 am
- Location: Cheltenham, U.K.
Re: Image converting does not work if path does contain non-English letters
The fact that the modified code runs suggests that there was a problem with the file list coding, doesn't it?
Maybe Pierre can help with the above 'question marks' issue...
Edit: Can you upload a small test file?
Maybe Pierre can help with the above 'question marks' issue...
Edit: Can you upload a small test file?
-
- Posts: 7
- Joined: Fri Jul 14, 2023 4:04 pm
Re: Image converting does not work if path does contain non-English letters
As far as I know, encoding of my filelist.txt is UTF-8.
I've attached my example as an archive. There are three files: abc.png, روز.png, FL.txt. I can upload them separately if archives are not allowed here.
My command when I'm inside a folder:
But when the file is run directly conversion works, although it outputs question marks instead of file name in Terminal:
In file system the file is written with a normal name: روز.webp
I've attached my example as an archive. There are three files: abc.png, روز.png, FL.txt. I can upload them separately if archives are not allowed here.
My command when I'm inside a folder:
Code: Select all
>nconvert.exe -l FL.txt -out webp
Conversion of abc.png into abc.webp OK
Error: Can't open file (روز.png)
Code: Select all
>nconvert.exe -out webp روز.png
Conversion of ???.png into ???.webp OK
You do not have the required permissions to view the files attached to this post.
-
- Author of XnView
- Posts: 44451
- Joined: Mon Oct 13, 2003 7:31 am
- Location: France
Re: Image converting does not work if path does contain non-English letters
could you send me the filelist.txt file?enthusiast wrote: ↑Sat Jul 15, 2023 12:58 pm I tried beta version, but I get error again.
File filelist.txt:Code: Select all
D:\file 1.png D:\file روز.png
Pierre.
-
- XnThusiast
- Posts: 4132
- Joined: Sun Apr 29, 2012 9:45 am
- Location: Cheltenham, U.K.
Re: Image converting does not work if path does contain non-English letters
It is in the ZIP, isn't it, or do you need something else?
-
- Author of XnView
- Posts: 44451
- Joined: Mon Oct 13, 2003 7:31 am
- Location: France
Re: Image converting does not work if path does contain non-English letters
Please try this version
Pierre.
-
- Posts: 7
- Joined: Fri Jul 14, 2023 4:04 pm
Re: Image converting does not work if path does contain non-English letters
It's working now, thank you!
Code: Select all
>nconvert.exe -l FL.txt -out webp
Conversion of abc.png into abc.webp OK
Conversion of ???.png into ???.webp OK
Conversion of def.png into def.webp OK
Hopefully this feature will be included in the next versions of XnConvert and Nconvert...
-
- Posts: 39
- Joined: Tue May 18, 2021 3:22 pm
Re: Image converting does not work if path does contain non-English letters
I know that this is beta version but I found out that it can't compress/process (can save png to avif but can't avif to avif) avif images ("my_error_exit...<Not a JPEG file: starts with 0x00 0x00> Error: Don't know how to read this picture" if "-in avif" command used shows only this message "Error: Don't know how to read this picture") but previous version (7.136) works fine. Also another problem that to make it work for/to jpeg-xl compression latest libJPEGXL.dll from XnView MP v1.53 needed or this don't works (in console/cmd shows that all OK but for real file is not creating) and in v7.136 (non Unicode) saving any images to jpeg-xl not working at all while in v7.121 it worked fine.
Commands used for avif:
nconvert.exe -v -32bits -out avif -o 2.avif" -avif_speed 8 -avif_quant_color 0 25 30 -avif_quant_alpha 0 25 30 -in avif "1.avif"
nconvert.exe -out avif -o "2.avif" "1.avif"
P.S. All needed plugins placed in plugins folder. Probably bug related to that problem viewtopic.php?f=57&t=43732 (and Unicode version don't have it fixed).
-
- Author of XnView
- Posts: 44451
- Joined: Mon Oct 13, 2003 7:31 am
- Location: France
Re: Image converting does not work if path does contain non-English letters
yes will be fixeddedbombom wrote: ↑Fri Aug 25, 2023 4:47 pm Commands used for avif:
nconvert.exe -v -32bits -out avif -o 2.avif" -avif_speed 8 -avif_quant_color 0 25 30 -avif_quant_alpha 0 25 30 -in avif "1.avif"
nconvert.exe -out avif -o "2.avif" "1.avif"
P.S. All needed plugins placed in plugins folder. Probably bug related to that problem viewtopic.php?f=57&t=43732 (and Unicode version don't have it fixed).
Pierre.