Page 1 of 1
					
				Image converting does not work if path does contain non-English letters
				Posted: Fri Jul 14, 2023 5:54 pm
				by enthusiast
				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.
			 
			
					
				Re: Image converting does not work if path does contain non-English letters
				Posted: Fri Jul 14, 2023 6:27 pm
				by cday
				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?
 
			
					
				Re: Image converting does not work if path does contain non-English letters
				Posted: Sat Jul 15, 2023 5:35 am
				by xnview
				
			 
			
					
				Re: Image converting does not work if path does contain non-English letters
				Posted: Sat Jul 15, 2023 12:58 pm
				by enthusiast
				I tried beta version, but I get error again.
File filelist.txt:
Command:
Code: Select all
nconvert.exe -l filelist.txt -q 90 -D -out webp
Result:
Code: Select all
Conversion of D:\file 1.png into D:\file 1.webp OK
  Error: Can't open file (D:\file روز.png)
 
			
					
				Re: Image converting does not work if path does contain non-English letters
				Posted: Sat Jul 15, 2023 2:52 pm
				by cday
				If you don't use a filelist and run something like this:
Code: Select all
nconvert.exe -q 90 -D -out webp روز.png
 ?
 
			
					
				Re: Image converting does not work if path does contain non-English letters
				Posted: Sat Jul 15, 2023 5:34 pm
				by enthusiast
				In this case, conversion works, although it outputs question marks instead of file name in Terminal:
Code: Select all
>nconvert.exe -out webp روز.png
Conversion of ???.png into ???.webp OK
In file system the file is written with a normal name:  روز.webp
 
			
					
				Re: Image converting does not work if path does contain non-English letters
				Posted: Sat Jul 15, 2023 5:50 pm
				by cday
				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?
			 
			
					
				Re: Image converting does not work if path does contain non-English letters
				Posted: Sat Jul 15, 2023 6:54 pm
				by enthusiast
				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:
Code: Select all
>nconvert.exe -l FL.txt -out webp
Conversion of abc.png into abc.webp OK
  Error: Can't open file (روز.png)
But when the file is run directly conversion works, although it outputs question marks instead of file name in Terminal:
Code: Select all
>nconvert.exe -out webp روز.png
Conversion of ???.png into ???.webp OK
In file system the file is written with a normal name:  روز.webp
 
			
					
				Re: Image converting does not work if path does contain non-English letters
				Posted: Mon Jul 17, 2023 1:32 pm
				by xnview
				enthusiast wrote: Sat Jul 15, 2023 12:58 pm
I tried beta version, but I get error again.
File filelist.txt:
 
could you send me the filelist.txt file?
 
			
					
				Re: Image converting does not work if path does contain non-English letters
				Posted: Mon Jul 17, 2023 1:51 pm
				by cday
				It is in the ZIP, isn't it, or do you need something else?
			 
			
					
				Re: Image converting does not work if path does contain non-English letters
				Posted: Tue Jul 18, 2023 8:00 am
				by xnview
				cday wrote: Mon Jul 17, 2023 1:51 pm
It is in the ZIP, isn't it, or do you need something else?
 
Please try this 
version 
			
					
				Re: Image converting does not work if path does contain non-English letters
				Posted: Tue Jul 18, 2023 11:33 am
				by enthusiast
				
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
The file is saved with the name روز.webp, so the question marks in the console don't bother me.  
 
Hopefully this feature will be included in the next versions of XnConvert and Nconvert...
 
			
					
				Re: Image converting does not work if path does contain non-English letters
				Posted: Fri Aug 25, 2023 4:47 pm
				by dedbombom
				xnview wrote: Tue Jul 18, 2023 8:00 am
cday wrote: Mon Jul 17, 2023 1:51 pm
It is in the ZIP, isn't it, or do you need something else?
 
Please try this 
version
 
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).
 
			
					
				Re: Image converting does not work if path does contain non-English letters
				Posted: Tue Aug 29, 2023 11:26 am
				by xnview
				dedbombom 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).
 
yes will be fixed