From 4c168db00243194e1a16021fe2f4a0ab29bc4ccf Mon Sep 17 00:00:00 2001 From: Pascal Quantin Date: Fri, 16 Oct 2015 11:03:08 +0200 Subject: print.c: use utf8_entities.h Change-Id: I92791ec51978be59944628b7eaccd2784dd72be1 Reviewed-on: https://code.wireshark.org/review/11089 Petri-Dish: Pascal Quantin Tested-by: Petri Dish Buildbot Reviewed-by: Pascal Quantin --- epan/print.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'epan/print.c') diff --git a/epan/print.c b/epan/print.c index f97c5c3be0..8ab50e39d0 100644 --- a/epan/print.c +++ b/epan/print.c @@ -37,6 +37,7 @@ #include #include #include +#include #include #define PDML_VERSION "0" @@ -654,7 +655,7 @@ static gchar *csv_massage_str(const gchar *source, const gchar *exceptions) csv_str = g_strescape(source, exceptions); tmp_str = csv_str; /* Locate the UTF-8 right arrow character and replace it by an ASCII equivalent */ - while ( (tmp_str = strstr(tmp_str, "\xe2\x86\x92")) != NULL ) { + while ( (tmp_str = strstr(tmp_str, UTF8_RIGHTWARDS_ARROW)) != NULL ) { tmp_str[0] = ' '; tmp_str[1] = '>'; tmp_str[2] = ' '; @@ -669,8 +670,8 @@ static void csv_write_str(const char *str, char sep, FILE *fh) { gchar *csv_str; - /* Do not escape the UTF-8 righ arrow character */ - csv_str = csv_massage_str(str, "\xe2\x86\x92"); + /* Do not escape the UTF-8 right arrow character */ + csv_str = csv_massage_str(str, UTF8_RIGHTWARDS_ARROW); fprintf(fh, "\"%s\"%c", csv_str, sep); g_free(csv_str); } -- cgit v1.2.1