[Geany] Does not re-open a non-UTF-8 file on startup

Lex Trotman elextr at xxxxx
Mon Oct 24 13:47:36 UTC 2011


> 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.
>>
>> 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.
>
> 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...
>>
>> 2. 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

>>
>> 3. 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



More information about the Users mailing list