From f5b4965699765375078f4feee8cd3a5c03d5b6ca Mon Sep 17 00:00:00 2001 From: yaworsky Date: Fri, 16 Sep 2005 09:26:26 +0000 Subject: Fixed locale issues. --- daemon/conf.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'daemon/conf.c') diff --git a/daemon/conf.c b/daemon/conf.c index 654e46b..19a5ad2 100644 --- a/daemon/conf.c +++ b/daemon/conf.c @@ -98,7 +98,7 @@ static void xml_start_element (GMarkupParseContext *context, { aval = *attribute_values; if( strcmp( aname, "name" ) == 0 ) - source->name = g_strdup( aval ); + source->name = g_locale_from_utf8( aval, -1, NULL, NULL, NULL ); else if( strcmp( aname, "type" ) == 0 ) { if( strcmp( aval, "internal" ) == 0 ) @@ -140,7 +140,7 @@ static void xml_start_element (GMarkupParseContext *context, { aval = *attribute_values; if( strcmp( aname, "name" ) == 0 ) - dest->name = g_strdup( aval ); + dest->name = g_locale_from_utf8( aval, -1, NULL, NULL, NULL ); else if( strcmp( aname, "file" ) == 0 ) dest->file = normalize_pathname( aval ); else if( strcmp( aname, "rotate" ) == 0 ) @@ -184,9 +184,9 @@ static void xml_start_element (GMarkupParseContext *context, else if( strcmp( aname, "olddir" ) == 0 ) dest->olddir = normalize_pathname( aval ); else if( strcmp( aname, "compresscmd" ) == 0 ) - dest->compresscmd = g_strdup( aval ); + dest->compresscmd = g_locale_from_utf8( aval, -1, NULL, NULL, NULL ); else if( strcmp( aname, "compressoptions" ) == 0 ) - dest->compressoptions = g_strdup( aval ); + dest->compressoptions = g_locale_from_utf8( aval, -1, NULL, NULL, NULL ); } if( !dest->name ) ERR( "Undefined destination name at line %d\n", line_number ); @@ -217,7 +217,7 @@ static void xml_start_element (GMarkupParseContext *context, for( ; (aname = *attribute_names) != NULL; attribute_names++, attribute_values++ ) { if( strcmp( aname, "name" ) == 0 ) - current_filter->name = g_strdup( *attribute_values ); + current_filter->name = g_locale_from_utf8( *attribute_values, -1, NULL, NULL, NULL ); } if( !current_filter->name ) { @@ -238,11 +238,11 @@ static void xml_start_element (GMarkupParseContext *context, { aval = *attribute_values; if( strcmp( aname, "source" ) == 0 ) - logpath->source = g_strdup( aval ); + logpath->source = g_locale_from_utf8( aval, -1, NULL, NULL, NULL ); else if( strcmp( aname, "filter" ) == 0 ) - logpath->filter = g_strdup( aval ); + logpath->filter = g_locale_from_utf8( aval, -1, NULL, NULL, NULL ); else if( strcmp( aname, "destination" ) == 0 ) - logpath->destination = g_strdup( aval ); + logpath->destination = g_locale_from_utf8( aval, -1, NULL, NULL, NULL ); } if( !logpath->source ) ERR( "Undefined log path source at line %d\n", line_number ); @@ -279,7 +279,7 @@ static void xml_start_element (GMarkupParseContext *context, else if( strcmp( aname, "mark_interval" ) == 0 ) mark_interval = strtoul( aval, NULL, 0 ); else if( strcmp( aname, "mark_message" ) == 0 ) - mark_message = g_strdup( aval ); + mark_message = g_locale_from_utf8( aval, -1, NULL, NULL, NULL ); else if( strcmp( aname, "hold" ) == 0 ) { hold = strtoul( aval, NULL, 0 ); -- cgit v1.2.3