Re: [gedit-list] How to change default encoding when saving?



Hi,

> > You are right.
> > But I'm not sure we need an option to select the default enconding.
> > I see 3 possible solutions:
> > 1. remember the last encoding chosen by the user 
> Under what circumstances did the user choose the encoding, during file
> save?

User can choose the encoding opening the file and/or saving it.
New files have UTF-8 as default encoding (even if some distros, namely
Mandrake, have changed this behavior)

> 
> > 2. adding a gconf key to configure the default encoding (but not a
> > user visible preference)
> 
> IMO we should read the default encoding at startup, if its in a GConf
> key, then what happens if the environment variable and key get out of
> sync? 

The gconf key should override the env variable.

> The only case is where a user might want a different default
> encoding than the rest of the system, in that case, if such a user
> really exists we can give them an override GConf key?
> 
> We should have one point of configuration at the local level. If
> specific overrides are needed (I'm not sure they are yet), then we'll
> make a GConf key.
> 
> > 3. always use the current encoding as default (while saving).
> 
> IMO this should already be the case, but its really a bug for the file
> chooser isn't it?

No, it is a bug for gedit.

> 
> > 
> > What do you think?
> 
> Does gedit use UTF-8 in all cases internally (in memory), then convert
> at save-time? Or does it try to use a certain encoding as soon as it
> knows about it? If it only converts at save-time, then 3 only is
> necessary.

It uses UTF-8 internally and tries to convert at save time.

Regards,
Paolo 

Attachment: signature.asc
Description: This is a digitally signed message part



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]