aboutsummaryrefslogtreecommitdiffstats
path: root/library/cpp/unified_agent_client/helpers.h
blob: 9c8f7273156d59c9115dd39c458c953f03887ad5 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#pragma once

#include "client.h"

#include <util/charset/utf8.h>

namespace NUnifiedAgent::NPrivate {
    bool IsUtf8(const THashMap<TString, TString>& meta);

    struct ResultReplacingNonUTF {
        bool IsTruncated{false};
        size_t BrokenCount{0};
        TString Data;
    };

    ResultReplacingNonUTF ReplaceNonUTF(TStringBuf message, char signBrokenSymbol = '?', size_t maxSize = std::numeric_limits<size_t>::max());
}