Bug 408280 - If the document name has non-latin characters, saving and loading vector layers is broken
Summary: If the document name has non-latin characters, saving and loading vector laye...
Status: RESOLVED FIXED
Alias: None
Product: krita
Classification: Applications
Component: Layers/Vector (show other bugs)
Version: 4.2.0
Platform: Microsoft Windows Microsoft Windows
: NOR normal
Target Milestone: ---
Assignee: Halla Rempt
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-06-04 08:15 UTC by sothao
Modified: 2019-06-04 15:21 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 sothao 2019-06-04 08:15:17 UTC
SUMMARY


STEPS TO REPRODUCE
1.Establish vectorized layer, draw vectorized graphics, save in Chinese, and then open the file is blank. 
2. 
3. 

OBSERVED RESULT


EXPECTED RESULT


SOFTWARE/OS VERSIONS
Windows: win10 64
macOS: 
Linux/KDE Plasma: 
(available in About System)
KDE Plasma Version: 
KDE Frameworks Version: 
Qt Version: 

ADDITIONAL INFORMATION
Comment 1 Halla Rempt 2019-06-04 08:19:04 UTC
What do you mean with "save in Chinese"?
Comment 2 Halla Rempt 2019-06-04 08:19:32 UTC
Set to needsinfo.
Comment 3 sothao 2019-06-04 08:26:29 UTC
(In reply to Boudewijn Rempt from comment #1)
> “用中文保存”是什么意思?

The failure of saving vectorized files in Chinese is as follows: save files as 123 or yuu.krita files without files, save them as 中文.krita files and read them blankly.
Comment 4 sothao 2019-06-04 08:28:00 UTC
(In reply to Boudewijn Rempt from comment #2)
> 设置为needsinfo。

What do you mean by that?
Comment 5 sothao 2019-06-04 08:35:20 UTC
Test again and find that the quick save button on the toolbar to save the vectorized file will also fail.
Comment 6 Halla Rempt 2019-06-04 08:39:59 UTC
I'm sorry, but I cannot reproduce this. I did the following:

* create a new krita file of 1600x1200 pixels
* add a vector share using the calligraphy tool
* saved the file as 中文.kra
* closed the image
* reopened the image.

Did you also set the title of the image (second tab in the new image dialog) to a Chinese string?
Comment 7 Halla Rempt 2019-06-04 08:44:37 UTC
Okay, on Windows I _can_ confirm the issue.
Comment 8 sothao 2019-06-04 08:47:19 UTC
The source of the problem has been found, not the problem of using Chinese when saving, but the second title in the document can not use Chinese.
Comment 9 Halla Rempt 2019-06-04 10:08:27 UTC
Git commit df70a870b72d70df236009199116791485ca781e by Boudewijn Rempt.
Committed on 04/06/2019 at 09:01.
Pushed by rempt into branch 'master'.

Fix loading vector layers when kzip mangled the paths on saving

We have to substitute the image name with the actual folder we find in the file
, which might be different, because kzip is crap at encodings. But we also
should be careful when comparing the layer's path with what we expect so we don't
double up the path to the file we want to read

M  +3    -4    libs/store/KoQuaZipStore.cpp

https://invent.kde.org/kde/krita/commit/df70a870b72d70df236009199116791485ca781e
Comment 10 sothao 2019-06-04 11:29:30 UTC
The source of the problem has been found, not the problem of using Chinese when saving, but the second title in the document can not use Chinese.
Comment 11 Halla Rempt 2019-06-04 11:40:32 UTC
Please don't change the title again: the bug has been fixed, and the fix will be in the next nightly build.
Comment 12 Halla Rempt 2019-06-04 11:41:31 UTC
And do not reopen the bug, either.
Comment 13 sothao 2019-06-04 11:42:43 UTC
(In reply to Boudewijn Rempt from comment #11)
> 请不要再次更改标题:错误已修复,修复将在下一个每晚构建中。



Thank you
Comment 14 Halla Rempt 2019-06-04 15:21:30 UTC
Git commit eada5bb027c47ef7cb287a5c080e11680022485e by Boudewijn Rempt.
Committed on 04/06/2019 at 15:21.
Pushed by rempt into branch 'krita/4.2'.

Fix loading vector layers when kzip mangled the paths on saving

We have to substitute the image name with the actual folder we find in the file
, which might be different, because kzip is crap at encodings. But we also
should be careful when comparing the layer's path with what we expect so we don't
double up the path to the file we want to read

M  +3    -4    libs/store/KoQuaZipStore.cpp

https://invent.kde.org/kde/krita/commit/eada5bb027c47ef7cb287a5c080e11680022485e