Use "UTF-8" instead of "UTF8" charset name
parent
176bc04069
commit
d42e8c419f
|
@ -338,7 +338,7 @@ moo_edit_load_default (G_GNUC_UNUSED MooEditLoader *loader,
|
||||||
|
|
||||||
if (!encoding)
|
if (!encoding)
|
||||||
{
|
{
|
||||||
result = try_load (edit, file, "UTF8", error);
|
result = try_load (edit, file, "UTF-8", error);
|
||||||
|
|
||||||
if (result == ERROR_ENCODING)
|
if (result == ERROR_ENCODING)
|
||||||
{
|
{
|
||||||
|
@ -732,7 +732,7 @@ moo_edit_save_default (G_GNUC_UNUSED MooEditSaver *saver,
|
||||||
g_return_val_if_fail (filename && filename[0], FALSE);
|
g_return_val_if_fail (filename && filename[0], FALSE);
|
||||||
|
|
||||||
if (!encoding)
|
if (!encoding)
|
||||||
encoding = "UTF8";
|
encoding = "UTF-8";
|
||||||
|
|
||||||
if (!do_write (edit, filename, encoding, error))
|
if (!do_write (edit, filename, encoding, error))
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
@ -755,7 +755,7 @@ moo_edit_save_copy_default (G_GNUC_UNUSED MooEditSaver *saver,
|
||||||
{
|
{
|
||||||
g_return_val_if_fail (MOO_IS_EDIT (edit), FALSE);
|
g_return_val_if_fail (MOO_IS_EDIT (edit), FALSE);
|
||||||
g_return_val_if_fail (filename && filename[0], FALSE);
|
g_return_val_if_fail (filename && filename[0], FALSE);
|
||||||
return do_write (edit, filename, encoding ? encoding : "UTF8", error);
|
return do_write (edit, filename, encoding ? encoding : "UTF-8", error);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -1174,7 +1174,7 @@ _moo_edit_filename_to_utf8 (const char *filename)
|
||||||
|
|
||||||
if (!utf_filename)
|
if (!utf_filename)
|
||||||
{
|
{
|
||||||
g_critical ("%s: could not convert filename to utf8", G_STRLOC);
|
g_critical ("%s: could not convert filename to UTF8", G_STRLOC);
|
||||||
|
|
||||||
if (err)
|
if (err)
|
||||||
{
|
{
|
||||||
|
|
|
@ -277,12 +277,12 @@ process_line (MooCmd *cmd,
|
||||||
{
|
{
|
||||||
GError *error = NULL;
|
GError *error = NULL;
|
||||||
|
|
||||||
freeme = g_convert_with_fallback (line, -1, "UTF8", charset,
|
freeme = g_convert_with_fallback (line, -1, "UTF-8", charset,
|
||||||
NULL, NULL, NULL, &error);
|
NULL, NULL, NULL, &error);
|
||||||
|
|
||||||
if (!freeme)
|
if (!freeme)
|
||||||
{
|
{
|
||||||
g_warning ("%s: could not convert text to UTF8:\n%s",
|
g_warning ("%s: could not convert text to UTF-8:\n%s",
|
||||||
G_STRLOC, line);
|
G_STRLOC, line);
|
||||||
g_warning ("%s: %s", G_STRLOC, error->message);
|
g_warning ("%s: %s", G_STRLOC, error->message);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue