* src/matcher_parser_lex.l
Fix 8bits strings not in utf8
+2004-08-24 [colin] 0.9.12cvs79.3
+
+ * src/matcher_parser_lex.l
+ Fix 8bits strings not in utf8
+
2004-08-24 [colin] 0.9.12cvs79.2
* src/compose.c
( cvs diff -u -r 1.30.2.1 -r 1.30.2.2 src/rfc2015.c; cvs diff -u -r 1.7.2.1 -r 1.7.2.2 src/rfc2015.h; ) > 0.9.12cvs78.1.patchset
( cvs diff -u -r 1.382.2.44 -r 1.382.2.45 src/compose.c; ) > 0.9.12cvs79.1.patchset
( cvs diff -u -r 1.382.2.45 -r 1.382.2.46 src/compose.c; ) > 0.9.12cvs79.2.patchset
+( cvs diff -u -r 1.16.2.1 -r 1.16.2.2 src/matcher_parser_lex.l; ) > 0.9.12cvs79.3.patchset
BINARY_AGE=0
EXTRA_VERSION=79
EXTRA_RELEASE=
-EXTRA_GTK2_VERSION=.2
+EXTRA_GTK2_VERSION=.3
if test \( $EXTRA_VERSION -eq 0 \) -o \( "x$EXTRA_RELEASE" != "x" \); then
VERSION=${MAJOR_VERSION}.${MINOR_VERSION}.${MICRO_VERSION}${EXTRA_RELEASE}${EXTRA_GTK2_VERSION}
#include <string.h>
#include <glib.h>
+#include "codeconv.h"
#include "matcher.h"
#include "matcher_parser_lex.h"
#include "matcher_parser_parse.h"
/* get out of the state: string ends. */
BEGIN(0);
*string_buf_ptr = '\0';
+ if (!g_utf8_validate(string_buf, -1, NULL)) {
+ gchar *tmp = conv_codeset_strdup(string_buf, conv_get_current_charset_str(), CS_UTF_8);
+ if (tmp) {
+ strcpy(string_buf, tmp);
+ g_free(tmp);
+ }
+ }
yylval.str = string_buf;
return MATCHER_STRING;
}