Thanks for the report. I only see the problem in the output in the log file. The filename itself is properly encoded. Is this what you are seeing, too?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Thanks for the answer. When you specify a file name in Russian letters without an extension, saving the file name with a picture (jpg, etc.) also spoils. I tried to understand the problem in the code and, in my opinion, the problem in the function save_image. There is no call to utf8on ($ filename); just as it did in savepdf .
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Thanks for reporting this and for the hint regarding save_image and _utf8_on/_utf8_off. I created a patch which is quite simple.
In fact this issue has already been fixed for all other file types other than images in commit f8b1cc (”Fixed saving PDFs with non-ASCII characters in the path and no extension“), which closed bug #312.
Maybe you want to refactor the code by moving the _utf8_* function calls and the comment (
# a filename returned by Gtk3::FileChooserDialog containing utf8 is# not marked as utf8. This is then mangled by the append operation# below, but not for the operations than come afterwards, so just# turning on utf8 for the append.
Thanks for the patch. I'm in the middle of a complete rewrite in Python, where the utf8 handling is transparent and therefore should not suffer from this problem.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Thanks for the report. I only see the problem in the output in the log file. The filename itself is properly encoded. Is this what you are seeing, too?
Thanks for the answer. When you specify a file name in Russian letters without an extension, saving the file name with a picture (jpg, etc.) also spoils. I tried to understand the problem in the code and, in my opinion, the problem in the function save_image. There is no call to utf8on ($ filename); just as it did in savepdf .
Thanks for reporting this and for the hint regarding
save_imageand_utf8_on/_utf8_off. I created a patch which is quite simple.In fact this issue has already been fixed for all other file types other than images in commit f8b1cc (”Fixed saving PDFs with non-ASCII characters in the path and no extension“), which closed bug #312.
Maybe you want to refactor the code by moving the
_utf8_*function calls and the comment () to a separate function, e.g.
utf8_append().Thanks for the patch. I'm in the middle of a complete rewrite in Python, where the utf8 handling is transparent and therefore should not suffer from this problem.