Bug 105238 - Saving in KTurtle mangles non-ASCII characters
Summary: Saving in KTurtle mangles non-ASCII characters
Status: RESOLVED DUPLICATE of bug 82462
Alias: None
Product: kturtle
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Mandriva RPMs Linux
: NOR normal
Target Milestone: ---
Assignee: Cies Breijs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-05-07 14:43 UTC by Karl Ove Hufthammer
Modified: 2005-05-25 22:13 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Karl Ove Hufthammer 2005-05-07 14:43:35 UTC
Version:           Latest CVS version (using KDE KDE 3.3.2)
Installed from:    Mandriva RPMs

Each time I save KTurtle programs, all non-ASCII characters get mangled. Example:
 
I write:
gåtil 20, 20
 
When I save, I (immediately) get:
gåtil 20, 20
 
When I save this, these characters get mangled too.
 
Note that 'gÃ¥til' is the byte sequence of a UTF-8 encoded 'gåtil' interpreted as a ISO-8859-1 byte 
sequence.
 
The strange thing is that when I look at the resulting file, it looks like it's actually saved in UTF-8 (it's a valid UTF-8 file, with valid UTF-8 byte sequences), but the wrong characters are saved. The characters corresponding to the UTF-8 byte sequence of the correct characters, but interpreted as ISO-8859-1, is stored as UTF-8. In other words, it's converted two UTF-8 twice:
 
Original string: the charater å
Gets converted to: the UTF-8 byte sequence for å (two bytes)
(Now it should be saved directly to disc. But instead:)
It gets interpreted as ISO-8859-1: å (two characters)
And finally saved as UTF-8: two characters, four bytes, valid UTF-8
 
My settings say UTF-8. And everything here is set to UTF-8 (locale, filesystem, editors), so I have no idea where the ISO-8859-1 stuff comes from.
 
I guess that the fileformat should always use UTF-8, regardless of the user's settings (locale, filesystem). Indeed, that's the only way things can work! (The example files use UTF-8, but the locale encoding of the users may vary.)
Comment 1 Cies Breijs 2005-05-25 22:13:29 UTC

*** This bug has been marked as a duplicate of 82462 ***