summaryrefslogtreecommitdiff
path: root/epan/print.c
diff options
context:
space:
mode:
authorPascal Quantin <pascal.quantin@gmail.com>2015-10-16 11:03:08 +0200
committerPascal Quantin <pascal.quantin@gmail.com>2015-10-16 12:15:42 +0000
commit4c168db00243194e1a16021fe2f4a0ab29bc4ccf (patch)
tree11f9ad8da4a6755cf0e9e86d7c9f50b6f950c1a5 /epan/print.c
parent0921fddc49b77e6855fe4ea5b96bd7bbae468a6d (diff)
downloadwireshark-4c168db00243194e1a16021fe2f4a0ab29bc4ccf.tar.gz
print.c: use utf8_entities.h
Change-Id: I92791ec51978be59944628b7eaccd2784dd72be1 Reviewed-on: https://code.wireshark.org/review/11089 Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
Diffstat (limited to 'epan/print.c')
-rw-r--r--epan/print.c7
1 files changed, 4 insertions, 3 deletions
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 <epan/charsets.h>
#include <wsutil/filesystem.h>
#include <wsutil/ws_version_info.h>
+#include <wsutil/utf8_entities.h>
#include <ftypes/ftypes-int.h>
#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);
}