Replies: 4 comments
-
For Chinese users: I tried setting
In my powershell profile, but didn't work. Character encoding is propably a complex issues. |
Beta Was this translation helpful? Give feedback.
-
Hello @GrandArth, Yes, libvips started out on Linux, which is just utf-8 everywhere, so I just ignored these issues (mostly). libvips uses glib for many file-related operations, and glib is also utf-8 everywhere. The only gotcha is that you have to translate to and from the filename encoding when using native APIs. This has a summary: https://developer.gnome.org/glib/stable/glib-Character-Set-Conversion.html So libvips should add calls to Let's tag this as an enhacement for 8.11. |
Beta Was this translation helpful? Give feedback.
-
Here's a previous attempt to fix this: #294 There are obviously still a few problems. |
Beta Was this translation helpful? Give feedback.
-
I see, thx for the reply.
|
Beta Was this translation helpful? Give feedback.
-
Describe the bug
In
![图片](https://user-images.githubusercontent.com/30680793/88469615-136f7580-cf26-11ea-9683-2c4f432a10c3.png)
D:\IMAGES\Screenshots
folder i have a set of images called屏幕截图(15)
.If i run a batch operation on them like this
![图片](https://user-images.githubusercontent.com/30680793/88469636-50d40300-cf26-11ea-9f10-cc64dcac5649.png)
ls|%{vips heifsave $_.Name "$($_.Basename).heic"}
i got the following resulted files:I ran a few test in Vscode and find out it seems that utf-8 string
屏幕截图(15)
was directly encoded into GB 2312灞忓箷鎴�鍥�(13)
.This could cause resulted files with Chinese directory redirected into non-existence directory.
For example:
With
ls | %{$_.DirectoryName}
i can get the output showing the directory.D:\IMAGES\[第01巻]第01巻第01巻\第01巻第01巻第01巻
.If I tried to encode it into HEIC using vips.exe using
vips heifsave "第01巻第01巻第01巻第01巻第01巻第01巻.png" "第01巻第01巻第01巻第01巻第01巻第01巻.heic"
I am running this command in
D:\IMAGES\[第01巻]第01巻第01巻\第01巻第01巻第01巻
where the
第01巻第01巻第01巻第01巻第01巻第01巻.png
is stored.I get no error ouput nor the resulted file.
![图片](https://user-images.githubusercontent.com/30680793/88469580-afe54800-cf25-11ea-8502-d2958b9e1c00.png)
To Reproduce
I am not really sure is this reproducible on Machine running with UTF-8 encoding.
I will run some other tests later, see if i can locate the problem.
I uploaded those file with Chinese names here.
Screenshots.zip
With any luck, you will be able to reproduce the issue on those files.
Environment
Additional context
I have encountered similiar issue with FFprobe and Mediainfo, but the problem back then is about characters misencoded into UTF-8, not from it. By adding '[Console]::OutputEncoding = [System.Text.Encoding]::UTF8;' in my profile the problem was sloved.
Let me know if i can provide other useful information .
Beta Was this translation helpful? Give feedback.
All reactions