Version: 0.1 (using KDE 3.2.2, (testing/unstable)) Compiler: gcc version 3.3.3 (Debian 20040401) OS: Linux (i686) release 2.4.23-1-k7 Saving logo files with special characters like in german keywords are not saved properly. The Program shows an error message: "... the selected encoding cannot encode every unicode character in it..."
what is your encoding set to in Settings -> Advanced Settings -> Configure Editor?
It was iso8859-1. I changed to UTF-8 in open/save and spelling tab. I didn't find any other encoding options in the editor settings. Now I got no error message at saving a file any more, but the special german chars are converted to _very_ special non german chars. So after saving the code has syntax errors and can not be run. I am using kdelibs from debian SID, so perhaps it is a bug in that texteditor version?
It works on my box where the editor in KTurtle is set to iso8859-1. The German special characters are all displayed and saved correctly as utf8 bu KTurtle. If I set the editor part encodong to utf8, it does work. I'll try to ask for more testers for German to try to see what the problem is and I'll ask around to see how generally this encoding problem is tackled.
ok, Stephan Asserhall discovered a parsing problem and fixed it so could you please update to today's sources and see if the problem is fixed? Thanks in advance!
Seems to be ok now, if i set open/save and spell checking encoding to UTF-8, too.
*** Bug has been marked as fixed ***.
I think I have a similar or the same problem with special Slovenian (or latin 2) characters. When I try to save a file with one of the letters šđžćč in it I get the same error dialog about wrong encoding and after canceling it I get another dialog saying how file couldn't be read (even though I'm saving file). The instructions in editor window also change to some strange two letter characters for every special latin 2 character. If I check settings for editor it is set to KDE-Default (which I guess is the same as the one set for current KDE locale, which in my case is ISO-8859-2) which I think should be able to save any of the šđžćč letter. I'm using KDE 3.4 and kturtle compiled from recent CVS sources.
i reopened it because it is reported several times again...
*** Bug 105238 has been marked as a duplicate of this bug. ***
Created attachment 12434 [details] Patch that fixes the problem for me Hello, using the katepart to use the loading and saving fixes the problem for me, it also can seem that i removed the warning about loading a file when there's an unsaved one, but katepart also takes care of that. Can you please test if this patch works for you also?
Created attachment 12819 [details] the patch breaks KTurtle for me in French The above patch totally breaks KTurtle for me as the French accents are not shown anymore.
Created attachment 12820 [details] KTurtle in French without the patch Without the patch, KTurtle displays correctly the accented french characters on my machine. My system is not utf8 globally LANG=en_US LANGUAGE=en_US:en
Hello! I'm using kturtle 0.6 on kubuntum /Linux (i686) release 2.6.17-11-386. There is still a problem with saving and loading files with international characters. I have tried UTF8/16 ISO8858-15 and other without luck. /Peter
Created attachment 20463 [details] Patch for fix this bug Remove double convert to UTF-8 (widget already returns text in UTF-8).
Created attachment 20465 [details] Modified patch Simle remove two lines of conversions.
Created attachment 20466 [details] Patch for fix saving Patch fix problem on saving in both UTF-8 and 8bit locales.
Created attachment 20467 [details] Patch for fix saving Fix last patch.
Hi I can confirm that the bug is still present in KDE 3.5.7 Best regards Bozidar Proevski
Bozidar: please precise your distribution and what LANG it uses. Then please precise what language you are having problem with. Thanks in advance, Anne-Marie
I'm using slackware 11.0 with KDE downloaded and compiled with konstruct. LANG=mk_MK.UTF-8 and I'm having problems with macedonian language. I can open a file and execute it, change it and execute again with no problem. After i save the file, the contents becomes garbled and no longer functions. I'm attaching two screenshots, one before and one just after saving the file. I commented this line (383 in my sources), editorInterface->setText( mString.utf8() ); and I had no problems after that. But I think that Andrey's patch is better. Best regards Bozidar Proevski
Created attachment 20870 [details] KTurtle before saving, program is ok
Created attachment 20871 [details] KTurtle after saving, program is garbled
yes Andrey's patch also works for me.
SVN commit 676298 by annma: Fix critical bug when the user language is UTF8 Special thanks to Andrey and Bozidar for the time they spent on that. BUG=82462 M +0 -2 kturtle.cpp --- branches/KDE/3.5/kdeedu/kturtle/src/kturtle.cpp #676297:676298 @@ -379,8 +379,6 @@ if ( url.isEmpty() ) slotSaveAs(); else { - QString mString = editorInterface->text(); // get the text - editorInterface->setText( mString.utf8() ); // convert it to utf8 editor->document()->saveAs(url); // use the KateParts method for saving loadFile(url); // reload the file as utf8 otherwise display weird chars setCaption( url.fileName() );
Why do you miss important part of my patch? --------- @@ -45,6 +45,7 @@ #include <ktexteditor/cursorinterface.h> #include <ktexteditor/editorchooser.h> #include <ktexteditor/editinterface.h> +#include <ktexteditor/encodinginterface.h> #include <ktexteditor/highlightinginterface.h> #include <ktexteditor/printinterface.h> #include <ktexteditor/selectioninterface.h> @@ -195,6 +196,7 @@ editor = doc->createView (editorDock, 0L); // editorInterface is the editor interface which allows us to access the text in the part editorInterface = dynamic_cast<KTextEditor::EditInterface*>(doc); + dynamic_cast<KTextEditor::EncodingInterface*>(doc)->setEncoding("UTF-8"); --------- If you miss this changes, KTurtle still have this bug on 8bit locales. Please, apply my patch completely.
SVN commit 676589 by annma: sorry Andrey, applied patch totally (my system is not UTF-8 so it works OK without the patch) BUG=82462 M +2 -0 kturtle.cpp --- branches/KDE/3.5/kdeedu/kturtle/src/kturtle.cpp #676588:676589 @@ -50,6 +50,7 @@ #include <ktexteditor/selectioninterface.h> #include <ktexteditor/undointerface.h> #include <ktexteditor/viewcursorinterface.h> +#include <ktexteditor/encodinginterface.h> #include "lexer.h" #include "settings.h" @@ -195,6 +196,7 @@ editor = doc->createView (editorDock, 0L); // editorInterface is the editor interface which allows us to access the text in the part editorInterface = dynamic_cast<KTextEditor::EditInterface*>(doc); + dynamic_cast<KTextEditor::EncodingInterface*>(doc)->setEncoding("UTF-8"); editorDock->setWidget(editor); // default the highlightstyle to "logo" using the needed i18n
*** Bug 156793 has been marked as a duplicate of this bug. ***