aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--epan/charsets.c20
-rw-r--r--epan/charsets.h1
-rw-r--r--epan/dvb_chartbl.c4
-rw-r--r--epan/proto.h1
-rw-r--r--epan/tvbuff.c8
5 files changed, 34 insertions, 0 deletions
diff --git a/epan/charsets.c b/epan/charsets.c
index 6c75a01287..732a54d98e 100644
--- a/epan/charsets.c
+++ b/epan/charsets.c
@@ -217,6 +217,26 @@ const gunichar2 charset_table_iso_8859_5[0x80] = {
0x0458, 0x0459, 0x045a, 0x045b, 0x045c, 0x00a7, 0x045e, 0x045f /* - 0xFF */
};
+/* ISO-8859-9 (http://en.wikipedia.org/wiki/ISO/IEC_8859-9#Code_page_layout) */
+const gunichar2 charset_table_iso_8859_9[0x80] = {
+ 0x0080, 0x0081, 0x0082, 0x0083, 0x0084, 0x0085, 0x0086, 0x0087, /* 0x80 - */
+ 0x0088, 0x0089, 0x008a, 0x008b, 0x008c, 0x008d, 0x008e, 0x008f, /* - 0x8F */
+ 0x0090, 0x0091, 0x0092, 0x0093, 0x0094, 0x0095, 0x0096, 0x0097, /* 0x90 - */
+ 0x0098, 0x0099, 0x009a, 0x009b, 0x009c, 0x009d, 0x009e, 0x009f, /* - 0x9F */
+ 0x00a0, 0x00a1, 0x00a2, 0x00a3, 0x00a4, 0x00a5, 0x00a6, 0x00a7, /* 0xA0 - */
+ 0x00a8, 0x00a9, 0x00aa, 0x00ab, 0x00ac, 0x00ad, 0x00ae, 0x00af, /* - 0xAF */
+ 0x00b0, 0x00b1, 0x00b2, 0x00b3, 0x00b4, 0x00b5, 0x00b6, 0x00b7, /* 0xB0 - */
+ 0x00b8, 0x00b9, 0x00ba, 0x00bb, 0x00bc, 0x00bd, 0x00be, 0x00bf, /* - 0xBF */
+ 0x00c0, 0x00c1, 0x00c2, 0x00c3, 0x00c4, 0x00c5, 0x00c6, 0x00c7, /* 0xC0 - */
+ 0x00c8, 0x00c9, 0x00ca, 0x00cb, 0x00cc, 0x00cd, 0x00ce, 0x00cf, /* - 0xCF */
+ 0x011e, 0x00d1, 0x00d2, 0x00d3, 0x00d4, 0x00d5, 0x00d6, 0x00d7, /* 0xD0 - */
+ 0x00d8, 0x00d9, 0x00da, 0x00db, 0x00dc, 0x0130, 0x015e, 0x00df, /* - 0xDF */
+ 0x00e0, 0x00e1, 0x00e2, 0x00e3, 0x00e4, 0x00e5, 0x00e6, 0x00e7, /* 0xE0 - */
+ 0x00e8, 0x00e9, 0x00ea, 0x00eb, 0x00ec, 0x00ed, 0x00ee, 0x00ef, /* - 0xEF */
+ 0x011f, 0x00f1, 0x00f2, 0x00f3, 0x00f4, 0x00f5, 0x00f6, 0x00f7, /* 0xF0 - */
+ 0x00f8, 0x00f9, 0x00fa, 0x00fb, 0x00fc, 0x0131, 0x015f, 0x00ff /* - 0xFF */
+};
+
/* Windows-1250 (http://en.wikipedia.org/wiki/Windows-1250) */
const gunichar2 charset_table_cp1250[0x80] = {
0x20ac, UNREPL, 0x201a, UNREPL, 0x201e, 0x2026, 0x2020, 0x2021, /* 0x80 - */
diff --git a/epan/charsets.h b/epan/charsets.h
index 3e076ec91a..a9a9e9f592 100644
--- a/epan/charsets.h
+++ b/epan/charsets.h
@@ -51,6 +51,7 @@ extern const gunichar2 charset_table_cp1250[0x80];
/* Tables for ISO-8859-X */
extern const gunichar2 charset_table_iso_8859_2[0x80];
extern const gunichar2 charset_table_iso_8859_5[0x80];
+extern const gunichar2 charset_table_iso_8859_9[0x80];
#ifdef __cplusplus
}
diff --git a/epan/dvb_chartbl.c b/epan/dvb_chartbl.c
index f4e77fb86d..c98461cd7f 100644
--- a/epan/dvb_chartbl.c
+++ b/epan/dvb_chartbl.c
@@ -232,6 +232,10 @@ dvb_enc_to_item_enc(dvb_encoding_e encoding)
case DVB_ENCODING_EXT_ISO_8859_5:
return ENC_ISO_8859_5 | ENC_NA;
+ case DVB_ENCODING_ISO_8859_9:
+ case DVB_ENCODING_EXT_ISO_8859_9:
+ return ENC_ISO_8859_9 | ENC_NA;
+
default: /* not supported */
return ENC_ASCII | ENC_NA;
}
diff --git a/epan/proto.h b/epan/proto.h
index 0e408f6f8c..39891fb182 100644
--- a/epan/proto.h
+++ b/epan/proto.h
@@ -288,6 +288,7 @@ WS_DLL_PUBLIC WS_MSVC_NORETURN void proto_report_dissector_bug(const char *messa
#define ENC_ISO_8859_1 0x0000000C
#define ENC_ISO_8859_2 0x0000000E
#define ENC_ISO_8859_5 0x00000014
+#define ENC_ISO_8859_9 0x0000001C
/*
* TODO:
diff --git a/epan/tvbuff.c b/epan/tvbuff.c
index 5d74393b42..2594c8a582 100644
--- a/epan/tvbuff.c
+++ b/epan/tvbuff.c
@@ -2022,6 +2022,10 @@ tvb_get_string_enc(wmem_allocator_t *scope, tvbuff_t *tvb, const gint offset,
strbuf = tvb_get_string_unichar2(scope, tvb, offset, length, charset_table_iso_8859_5);
break;
+ case ENC_ISO_8859_9:
+ strbuf = tvb_get_string_unichar2(scope, tvb, offset, length, charset_table_iso_8859_9);
+ break;
+
case ENC_UTF_8:
/*
* XXX - should map all invalid UTF-8 sequences
@@ -2165,6 +2169,10 @@ tvb_get_stringz_enc(wmem_allocator_t *scope, tvbuff_t *tvb, const gint offset, g
strptr = tvb_get_stringz_unichar2(scope, tvb, offset, lengthp, charset_table_iso_8859_5);
break;
+ case ENC_ISO_8859_9:
+ strptr = tvb_get_stringz_unichar2(scope, tvb, offset, lengthp, charset_table_iso_8859_9);
+ break;
+
case ENC_UTF_8:
/*
* XXX - should map all invalid UTF-8 sequences