summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2011-09-20 17:42:27 +0000
committerGuy Harris <guy@alum.mit.edu>2011-09-20 17:42:27 +0000
commit0989347195fc77ef474001a71100f340926cccdb (patch)
tree9ba123277a88c2e2865971e7bf95a6bc50b0c789
parent98bbf4578d097e58ece0a1b614daab1bae9b8ee4 (diff)
downloadwireshark-0989347195fc77ef474001a71100f340926cccdb.tar.gz
Add an ENC_ASCII; right now, it's the same as ENC_UTF_8, but it should
eventually cause all bytes with the 8th bit set to be displayed as error indications. svn path=/trunk/; revision=39064
-rw-r--r--epan/proto.h13
1 files changed, 12 insertions, 1 deletions
diff --git a/epan/proto.h b/epan/proto.h
index 0394e21344..98ef9c522f 100644
--- a/epan/proto.h
+++ b/epan/proto.h
@@ -238,10 +238,21 @@ typedef struct _protocol protocol_t;
*
* The value for ENC_EBCDIC is subject to change in a future release (or
* to replacement with multiple values for different flavors of EBCDIC).
- * Additional encodings will also be provided.
+ *
+ * We currently add some additional encodings, for various ASCII-based
+ * encodings, but use the same value as ENC_UTF_8, for now, so that we
+ * can mark the appropriate encoding. Ultimately, we should handle
+ * those encodings by mapping them to UTF-8 for display; for ASCII,
+ * all bytes with the 8th bit set should be mapped to some "this is
+ * not a valid character" glyph, as ENC_ASCII should mean "this is
+ * ASCII, not some extended variant thereof". Perhaps we should also
+ * map control characters to the Unicode glyphs showing the name of
+ * the control character in small caps, diagonally. (Unfortunately,
+ * those only exist for C0, not C1.)
*/
#define ENC_CHARENCODING_MASK 0x7FFFFFFE /* mask out byte-order bits */
#define ENC_UTF_8 0x00000000
+#define ENC_ASCII 0x00000000
#define ENC_EBCDIC 0x0EBCD1C0
/*