Wireshark-commits: [Wireshark-commits] master-2.6 6077a35: Clean up some ASCII vs. EBCDIC string ha
From: Wireshark code review <code-review-do-not-reply@xxxxxxxxxxxxx>
Date: Tue, 28 May 2019 01:50:34 +0000
URL: https://code.wireshark.org/review/gitweb?p=wireshark.git;a=commit;h=6077a35c05ca74e0b5a8372e9d8e8fb640ec27db
Submitter: "Guy Harris <guy@xxxxxxxxxxxx>"
Changed: branch: master-2.6
Repository: wireshark

Commits:

6077a35 by Guy Harris (guy@xxxxxxxxxxxx):

    Clean up some ASCII vs. EBCDIC string handling.
    
    In at least one capture, structure IDs are in ASCII even though the code
    page in the header is an EBCDIC code page.  Determine the structure ID's
    character encoding based on whether it's the ASCII or EBCDIC version of
    the ID value, not on the global character encoding.
    
    We were using the *integer* encoding, not the *string* encoding, for the
    "qprotect" field, which is a string; fix that.
    
    Use STR_UNICODE for strings, as they're not guaranteed to consist of
    characters that can be mapped to ASCII characters (even the common
    subset of EBCDIC, not counting code page-dependent code points, has
    non-ASCII printable characters in it).
    
    Change-Id: I971dd7ae55617c27ebe88f31089b2495374593bf
    Reviewed-on: https://code.wireshark.org/review/33399
    Reviewed-by: Guy Harris <guy@xxxxxxxxxxxx>
    (cherry picked from commit b9c69d6ef8b2c759bb1b4be05240bba42038a051)
    Reviewed-on: https://code.wireshark.org/review/33401
    

Actions performed:

    from  393cd68   Strings in mDNS TXT records are UTF-8.
     add  6077a35   Clean up some ASCII vs. EBCDIC string handling.


Summary of changes:
 epan/dissectors/packet-mq.c | 266 ++++++++++++++++++++++++--------------------
 1 file changed, 143 insertions(+), 123 deletions(-)