Commit 47ebd366fd38071cad3d7f2bc6692da2aed99743
1 parent
ab6bc6dc
Exists in
master
and in
5 other branches
Incluindo "preload" do charset padrão ao importar arquivos
Showing
1 changed file
with
3 additions
and
4 deletions
Show diff stats
src/gtk/dialog.c
| @@ -281,7 +281,7 @@ | @@ -281,7 +281,7 @@ | ||
| 281 | GError *error = NULL; | 281 | GError *error = NULL; |
| 282 | gchar *text = NULL; | 282 | gchar *text = NULL; |
| 283 | 283 | ||
| 284 | - trace("Loading \"%s\"",filename); | 284 | + trace("Loading \"%s\" encoding=%s",filename,encoding); |
| 285 | 285 | ||
| 286 | if(!g_file_get_contents(filename,&text,NULL,&error)) | 286 | if(!g_file_get_contents(filename,&text,NULL,&error)) |
| 287 | { | 287 | { |
| @@ -316,11 +316,10 @@ | @@ -316,11 +316,10 @@ | ||
| 316 | const gchar **charset = NULL; | 316 | const gchar **charset = NULL; |
| 317 | // int f; | 317 | // int f; |
| 318 | 318 | ||
| 319 | + g_get_charset(attr); | ||
| 320 | + | ||
| 319 | if(g_get_filename_charsets(&charset)) | 321 | if(g_get_filename_charsets(&charset)) |
| 320 | - { | ||
| 321 | - *attr = "UTF-8"; | ||
| 322 | return; | 322 | return; |
| 323 | - } | ||
| 324 | 323 | ||
| 325 | #ifdef WIN32 | 324 | #ifdef WIN32 |
| 326 | 325 |