Commit 708ac12
Me
ui.filechooser: Default to autodetecting encoding (#350)
When we added the custom file chooser that allowed encoding selection,
the default encoding behaviour changed. Previously, there would be no
custom encoding, so the default behaviour would be used: try the user-
configured encodings, then try the GtkSourceView list for the current
locale.
With the custom filechooser, the default encoding selection was whatever
the current locale was, and so instead of using the user-configured
encoding list, we would always try the current locale encoding. This is
fine in most scenarios because users' locale encoding is typically
UTF-8... but if a user had something more exciting as their locale
things would go badly.
More importantly, because the user had chosen a locale, we didn't try
the user-configured locales. While this behaviour is arguably correct
for when the user actually chooses an encoding, it's definitely not
right when the user just doesn't select one and gets the locale-default
encoding.
This change fixes all of this by simply adding an "Autodetect" option to
the custom filechooser, and using that by default.1 parent d0370bf commit 708ac12
1 file changed
Lines changed: 11 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
| 23 | + | |
| 24 | + | |
23 | 25 | | |
24 | 26 | | |
25 | 27 | | |
| |||
65 | 67 | | |
66 | 68 | | |
67 | 69 | | |
68 | | - | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
69 | 76 | | |
70 | 77 | | |
71 | 78 | | |
| |||
81 | 88 | | |
82 | 89 | | |
83 | 90 | | |
84 | | - | |
| 91 | + | |
85 | 92 | | |
86 | 93 | | |
87 | 94 | | |
| |||
91 | 98 | | |
92 | 99 | | |
93 | 100 | | |
| 101 | + | |
| 102 | + | |
94 | 103 | | |
95 | 104 | | |
96 | 105 | | |
| |||
0 commit comments