Try to fix some problems when opening files with non-Ascii characters on Windows from the command line.

git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@3263 ea778897-0a13-0410-b9d1-a72fbfd435f5
This commit is contained in:
Enrico Tröger 2008-11-21 15:42:26 +00:00
parent 09d2b48ad8
commit f31899538d
2 changed files with 11 additions and 1 deletions

View File

@ -1,3 +1,10 @@
2008-11-21 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
* src/main.c:
Try to fix some problems when opening files with non-Ascii characters
on Windows from the command line.
2008-11-21 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
* src/symbols.c:

View File

@ -774,7 +774,10 @@ static gboolean open_cl_files(gint argc, gchar **argv)
for (i = 1; i < argc; i++)
{
gchar *filename = main_get_argv_filename(argv[i]);
#ifdef G_OS_WIN32
/* It seems argv elements are encoded in CP1252 on a German Windows */
setptr(filename, g_locale_to_utf8(filename, -1, NULL, NULL, NULL));
#endif
if (filename && !main_handle_filename(filename))
{
const gchar *msg = _("Could not find file '%s'.");