diff --git a/epan/uat.c b/epan/uat.c index 084c3f8504..07f994bc67 100644 --- a/epan/uat.c +++ b/epan/uat.c @@ -44,6 +44,11 @@ #include "uat-int.h" +/* + * XXX Files are encoded as ASCII. We might want to encode them as UTF8 + * instead. + */ + static GPtrArray* all_uats = NULL; void uat_init(void) { @@ -268,7 +273,7 @@ static void putfld(FILE* fp, void* rec, uat_field_t* f) { char c = fld_ptr[i]; if (c == '"' || c == '\\' || ! g_ascii_isprint((guchar)c) ) { - fprintf(fp,"\\x%.2x",c); + fprintf(fp,"\\x%02x", (guchar) c); } else { putc(c,fp); } @@ -281,7 +286,7 @@ static void putfld(FILE* fp, void* rec, uat_field_t* f) { guint i; for(i=0;i