Commit Graph

9 Commits

Author SHA1 Message Date
John Thacker 1744ce4a0f epan: Add ENC_BOM modifier for UTF-16, UCS-2, UCS-4
Add ENC_BOM to the list of bitflag modifiers, and use it with
UTF-16, UCS-2, and UCS-4 (UTF-32). If set, this means that the
first 2 (or 4) octets, if present, are checked to see if they are
a Big-Endian BYTE ORDER MARK ("ZERO WIDTH NON-BREAKING SPACE"). If so,
those octets are skipped and the encoding is set to Little-Endian
or Big-Endian depending on endianness of the BOM.

If the BOM is absent, the passed in Endianness flag is used normally.

Related to #17991
2023-06-08 11:25:54 +00:00
John Thacker 9ea2b3db5e epan: Implement EBCDIC CP 500, for DRDA
EBCDIC Code Page 500 has exactly the same repertoire as CP 037,
covering all of ISO-8859-1, but has 7 bytes permuted. It is
the default code page for DRDA; use it there.
2023-04-26 12:30:46 +00:00
John Thacker 40e51a6f55 iana_charsets: Add a couple of supported encodings
Add a few encodings that Wireshark already supports to
IANA charsets.
2023-04-22 07:53:55 -04:00
Huang Qiangxiong c3abd7bc19 iana_charsets: redefine basic macro and add a shorter enum_val_t array
Redefined the format of the basic macro for creating iana charset enumeration
type, enum_val_t or value_string array. That will also maintain the mapping
relationship between iana charset and wireshar string encoding.

Introduced a way to create sub sets of value_string or enum_val_t array from
the big iana charsets table. The ws_supported_mibenum_vals_character_sets_ev_array
is that kind of sub sets enum_val_t array to display enum preference 'Default
charactor encoding' of xml dissector friendly in right click popup menu.

The mibenum_charset_to_encoding() function is changed to generate mapping code
(switch/case) according to the basic macro automatically.
2023-03-30 11:19:31 +00:00
Huang Qiangxiong 2d0616390a iana_charsets: Define iana charsets enumeration and enum_val_t array 2023-03-24 19:38:26 +00:00
Moshe Kaplan 1c3a9af869 Add files with WS_DLL_PUBLIC to Doxygen
Add @file markers for most files that
contain functions exported with
WS_DLL_PUBLIC so that Doxygen will
generate documentation for them.
2021-11-29 21:27:45 +00:00
Dario Lombardo 55c68ee69c epan: use SPDX indentifiers.
Skipping dissectors dir for now.

Change-Id: I717b66bfbc7cc81b83f8c2cbc011fcad643796aa
Reviewed-on: https://code.wireshark.org/review/25694
Petri-Dish: Dario Lombardo <lomato@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-02-08 19:29:45 +00:00
Guy Harris 315d595dcd Get rid of extra blank line.
Change-Id: Ibe35ee1dd8dcea5641e8cb8104c1fbf33966eca4
Reviewed-on: https://code.wireshark.org/review/15299
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2016-05-08 21:17:30 +00:00
Guy Harris d4339c6fbd Remove the MIBenum stuff from the WAP code.
MIBenum values are from an IANA registry, not a WAP specification; add
<epan/iana_charsets.h> to declare the MIBenum -> Wireshark encoding
mapper routine and the value_string_ext for MIBenum values, and
epan/iana_charsets.c to define them.

Change-Id: I6d9c82cd011bd5211c688322e6423de38e161f41
Reviewed-on: https://code.wireshark.org/review/15298
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2016-05-08 21:15:43 +00:00