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

Commits:

33f0af8 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>
    (backported from commit b9c69d6ef8b2c759bb1b4be05240bba42038a051)
    Reviewed-on: https://code.wireshark.org/review/33402
    

Actions performed:

    from  1250425   Strings in mDNS TXT records are UTF-8.
     add  33f0af8   Clean up some ASCII vs. EBCDIC string handling.


Summary of changes:
 epan/dissectors/packet-mq.c | 229 ++++++++++++++++++++++++--------------------
 1 file changed, 124 insertions(+), 105 deletions(-)