Wireshark-dev: Re: [Wireshark-dev] tvb_get_string_enc() doesn't always return valid UTF-8

From: Jakub Zawadzki <darkjames-ws@xxxxxxxxxxxx>
Date: Sun, 26 Jan 2014 22:27:23 +0100
On Tue, Jan 21, 2014 at 08:01:15AM -0500, Evan Huus wrote:
> On Tue, Jan 21, 2014 at 2:40 AM, Guy Harris <guy@xxxxxxxxxxxx> wrote:
> >
> > On Jan 20, 2014, at 5:59 PM, Evan Huus <eapache@xxxxxxxxx> wrote:
> >
> >> In which case is dumb search-and-replace of tvb_get_string with
> >> tvb_get_string_enc and ENC_ASCII an easy way to make (part of) the API
> >> transition?
> >
> > Did somebody say that had been done or suggest that it be done?
> 
> I thought it was kind of implied when you wrote "We should also
> probably audit all calls to tvb_get_string() and tvb_get_stringz() in
> dissectors and change them to tvb_get_string_enc() with the
> appropriate encoding."
> 
> If tvb_get_string() behaves identically to tvb_get_string_enc(...
> ENC_ASCII) then there doesn't seem much point in having both.

We can also think about dropping STR_ASCII, STR_UNICODE stuff.

To be honest I'm not happy about it, I'd rather still display
non-printable ascii in escaped-hex-form.

Cheers,
Kuba.