Hello World,
I noticed an annoying behavior (could be since new version 0.21):
I have 3 files open when I quit geany. Two are UTF-8 encoded, one is CP1252.
If I reopen geany, the two UTF-8 files get loaded as expected, but the CP1252 file does not. Instead I get the following messages in the status window (translated from german):
The File "J:\QUARTIS_dev\locale\QrtRes_de.rc" is not a valid UTF-8. One or more file(s) from the last session could not be loaded.
It re-opened all files until recently, so I suspect it's because of the new version.
Note: I cannot change the encoding to UTF-8.
Is this the expected behavior? Did I mis-configure something?
TIA and best regards Andreas
2011/10/21 Andreas Tscharner andy@vis.ethz.ch:
Hello World,
I noticed an annoying behavior (could be since new version 0.21):
I have 3 files open when I quit geany. Two are UTF-8 encoded, one is CP1252.
If I reopen geany, the two UTF-8 files get loaded as expected, but the CP1252 file does not. Instead I get the following messages in the status window (translated from german):
The File "J:\QUARTIS_dev\locale\QrtRes_de.rc" is not a valid UTF-8. One or more file(s) from the last session could not be loaded.
It re-opened all files until recently, so I suspect it's because of the new version.
Note: I cannot change the encoding to UTF-8.
Is this the expected behavior? Did I mis-configure something?
Hi Andreas,
After you close Geany, can you post the line from your geany.conf file that begins FILE_NAME and contains the filename of the problem file so we can tell if the error is in saving or loading. Also please post the line pref_wditor_default_open_encoding.
Thanks Lex
(or the whole geany.conf if you remove or don't mind sharing any personal details in it)
TIA and best regards Andreas -- ("`-''-/").___..--''"`-._ `o_ o ) `-. ( ).`-.__.`) (_Y_.)' ._ ) `._ `. ``-..-' _..`--'_..-_/ /--'_.' .' (il).-'' (li).' ((!.-'
Andreas Tscharner andy@vis.ethz.ch ICQ-No. 14356454 _______________________________________________ Geany mailing list Geany@uvena.de https://lists.uvena.de/cgi-bin/mailman/listinfo/geany
On 21.10.2011 10:46, Lex Trotman wrote:
2011/10/21 Andreas Tscharnerandy@vis.ethz.ch:
[snip]
If I reopen geany, the two UTF-8 files get loaded as expected, but the CP1252 file does not. Instead I get the following messages in the status window (translated from german):
The File "J:\QUARTIS_dev\locale\QrtRes_de.rc" is not a valid UTF-8. One or more file(s) from the last session could not be loaded.
[snip]
After you close Geany, can you post the line from your geany.conf file that begins FILE_NAME and contains the filename of the problem file so we can tell if the error is in saving or loading. Also please post the line pref_wditor_default_open_encoding.
FILE_NAME_1=0;Conf;0;16;1;1;0;J:\QUARTIS\_dev\locale\QrtRes_de.rc;0;4
pref_editor_default_open_encoding=None
Best regards Andreas
[...]
FILE_NAME_1=0;Conf;0;16;1;1;0;J:\QUARTIS\_dev\locale\QrtRes_de.rc;0;4
Thanks Andreas,
The 16 in the line above says that when it closed Geany thought that the file was UTF-8 encoding, thats why it tried to open it as that.
I guess we better get the obvious one out of the way first :) Can you check what Geany thinks the encoding of the file is (document->set encodings->).
How do you open the file? Do you explicitly set the encoding on open?
Cheers Lex
On 22.10.2011 01:23, Lex Trotman wrote:
[...]
FILE_NAME_1=0;Conf;0;16;1;1;0;J:\QUARTIS\_dev\locale\QrtRes_de.rc;0;4
Thanks Andreas,
The 16 in the line above says that when it closed Geany thought that the file was UTF-8 encoding, thats why it tried to open it as that.
Interesting. In the status line, it says "Encoding: CP1252"
I guess we better get the obvious one out of the way first :) Can you check what Geany thinks the encoding of the file is (document->set encodings->).
Even more interesting: in the status line it says CP1252 (which is correct), in the menu it is actually set to UTF-8 (not correct. The file contains non-ASCII characters which are actually CP1252 encoded).
I think that's the problem...
How do you open the file? Do you explicitly set the encoding on open?
Using the open dialog. I looked at the extended options this time and the encoding was set to "read from file" (translated from german)...
Best regards Andreas
2011/10/24 Andreas Tscharner andy@vis.ethz.ch:
On 22.10.2011 01:23, Lex Trotman wrote:
[...]
FILE_NAME_1=0;Conf;0;16;1;1;0;J:\QUARTIS\_dev\locale\QrtRes_de.rc;0;4
Thanks Andreas,
The 16 in the line above says that when it closed Geany thought that the file was UTF-8 encoding, thats why it tried to open it as that.
Interesting. In the status line, it says "Encoding: CP1252"
I guess we better get the obvious one out of the way first :) Can you check what Geany thinks the encoding of the file is (document->set encodings->).
Even more interesting: in the status line it says CP1252 (which is correct), in the menu it is actually set to UTF-8 (not correct. The file contains non-ASCII characters which are actually CP1252 encoded).
I think that's the problem...
How do you open the file? Do you explicitly set the encoding on open?
Using the open dialog. I looked at the extended options this time and the encoding was set to "read from file" (translated from german)...
Hi Andreas,
Several things to look at.
1. what is the setting of preferences, files, default encoding (there are two of them), had you previously set them and have they changed with the upgrade? Or have you used a new config with the upgrade.
2. what is your machine locale
Both the above affect the order it tries encodings, then its in an implementation defined order
3. after opening the suspect file, look at help->debug messages and see what conversions it tried and what it ended up using
Cheers Lex
Best regards Andreas -- ("`-''-/").___..--''"`-._ `o_ o ) `-. ( ).`-.__.`) (_Y_.)' ._ ) `._ `. ``-..-' _..`--'_..-_/ /--'_.' .' (il).-'' (li).' ((!.-'
Andreas Tscharner andy@vis.ethz.ch ICQ-No. 14356454 _______________________________________________ Geany mailing list Geany@uvena.de https://lists.uvena.de/cgi-bin/mailman/listinfo/geany
On 24.10.2011 13:12, Lex Trotman wrote:
2011/10/24 Andreas Tscharnerandy@vis.ethz.ch:
On 22.10.2011 01:23, Lex Trotman wrote:
[snip]
Interesting. In the status line, it says "Encoding: CP1252"
I guess we better get the obvious one out of the way first :) Can you check what Geany thinks the encoding of the file is (document->set encodings->).
Even more interesting: in the status line it says CP1252 (which is correct), in the menu it is actually set to UTF-8 (not correct. The file contains non-ASCII characters which are actually CP1252 encoded).
I think that's the problem...
[snip]
Hi Andreas,
Hello Lex, Thank you for your patience...
Several things to look at.
- what is the setting of preferences, files, default encoding (there
are two of them), had you previously set them and have they changed with the upgrade? Or have you used a new config with the upgrade.
Default encoding for new files is: UTF-8 Default encoding for non-unicode files is: None (The checkbox between these two options is set)
As far as I can remember, I previously set the default encoding for new files to UTF-8, but I am not sure about the other setting...
- what is your machine locale
Both the above affect the order it tries encodings, then its in an implementation defined order
I don't know exactly. It is a Win 7 Professional German version, so I suppose the locale is CP1252
- after opening the suspect file, look at help->debug messages and
see what conversions it tried and what it ended up using
13:25:41: Geany INFO : Trying to convert 191588 bytes of data from CP1252 into UTF-8. 13:25:41: Geany INFO : Converted from CP1252 to UTF-8. 13:25:41: Geany INFO : J:\QUARTIS_dev\locale\QrtRes_de.rc : Conf (CP1252)
Thanks and best regards Andreas
Hello Lex, Thank you for your patience...
No problem, thanks for yours, I'm sorry for the time this is taking, but since this does not misbehave here I have to get you to try everything :)
Several things to look at.
- what is the setting of preferences, files, default encoding (there
are two of them), had you previously set them and have they changed with the upgrade? Or have you used a new config with the upgrade.
Default encoding for new files is: UTF-8 Default encoding for non-unicode files is: None (The checkbox between these two options is set)
All ok, has no effect on loading since it is none.
As far as I can remember, I previously set the default encoding for new files to UTF-8, but I am not sure about the other setting...
- what is your machine locale
Both the above affect the order it tries encodings, then its in an implementation defined order
I don't know exactly. It is a Win 7 Professional German version, so I suppose the locale is CP1252
Have a look at the end of the Geany version line in the help->debug messages (line one or two usually) it should have a language.encoding
- after opening the suspect file, look at help->debug messages and
see what conversions it tried and what it ended up using
13:25:41: Geany INFO : Trying to convert 191588 bytes of data from CP1252 into UTF-8. 13:25:41: Geany INFO : Converted from CP1252 to UTF-8. 13:25:41: Geany INFO : J:\QUARTIS_dev\locale\QrtRes_de.rc : Conf (CP1252)
If this is the only "trying..." message then I would expect it gets the cp1252 from the locale, the question is why is there a difference between the menu encoding and the status line, both should be set from the same memory location.
You might also look at file->properties and see which it agrees with.
Hmmm, I think I might have an inkling what the problem is, depends on what your locale says.
Cheers Lex
On 24.10.2011 15:47, Lex Trotman wrote:
Hello Lex, Thank you for your patience...
No problem, thanks for yours, I'm sorry for the time this is taking, but since this does not misbehave here I have to get you to try everything :)
[snip]
Default encoding for new files is: UTF-8 Default encoding for non-unicode files is: None (The checkbox between these two options is set)
All ok, has no effect on loading since it is none.
As far as I can remember, I previously set the default encoding for new files to UTF-8, but I am not sure about the other setting...
- what is your machine locale
Both the above affect the order it tries encodings, then its in an implementation defined order
I don't know exactly. It is a Win 7 Professional German version, so I suppose the locale is CP1252
Have a look at the end of the Geany version line in the help->debug messages (line one or two usually) it should have a language.encoding
10:14:48: Geany INFO : Geany 0.21, German_Switzerland.1252
[snip]
13:25:41: Geany INFO : Trying to convert 191588 bytes of data from CP1252 into UTF-8. 13:25:41: Geany INFO : Converted from CP1252 to UTF-8. 13:25:41: Geany INFO : J:\QUARTIS_dev\locale\QrtRes_de.rc : Conf (CP1252)
If this is the only "trying..." message then I would expect it gets the cp1252 from the locale, the question is why is there a difference between the menu encoding and the status line, both should be set from the same memory location.
You might also look at file->properties and see which it agrees with.
Encoding: CP1252
Best regards Andreas
Thanks Andreas, I now know what the problem is, but I'm going to have to get someone else to look at the solution.
Cheers Lex