Bug 489360 - After Kate restarts, unsaved Chinese content become garbled in the session
Summary: After Kate restarts, unsaved Chinese content become garbled in the session
Status: RESOLVED FIXED
Alias: None
Product: kate
Classification: Applications
Component: sessions (show other bugs)
Version: 24.05.1
Platform: Other Microsoft Windows
: NOR normal
Target Milestone: ---
Assignee: KWrite Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-06-28 07:42 UTC by cgpiece
Modified: 2024-07-09 16:38 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
Screenshot (27.11 KB, image/png)
2024-06-28 07:42 UTC, cgpiece
Details

Note You need to log in before you can comment on or make changes to this bug.
Description cgpiece 2024-06-28 07:42:40 UTC
Created attachment 171118 [details]
Screenshot

***
If you're not sure this is actually a bug, instead post about it at https://discuss.kde.org

If you're reporting a crash, attach a backtrace with debug symbols; see https://community.kde.org/Guidelines_and_HOWTOs/Debugging/How_to_create_useful_crash_reports
***

SUMMARY
It seems this only occurs with unsaved files.

STEPS TO REPRODUCE
1.  Enable automatic loading and recovery of unsaved files in the session settings.
2.  Save a session, new file and input some Chinese characters.
3.  Just close Kate without save, and reopen it again.
4. You will find that the unsaved file in the session will display Chinese content as garbled text.
Comment 1 Christoph Cullmann 2024-07-09 16:38:48 UTC
Git commit 847f49b868bc014814f91f9f5106b691b06eb3d0 by Christoph Cullmann.
Committed on 09/07/2024 at 16:27.
Pushed by cullmann into branch 'master'.

ensure we restore stashed documents with right encoding

M  +10   -11   apps/lib/katestashmanager.cpp

https://invent.kde.org/utilities/kate/-/commit/847f49b868bc014814f91f9f5106b691b06eb3d0