diff options
author | kerzum <kerzum@yandex-team.ru> | 2022-02-10 16:49:33 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:49:33 +0300 |
commit | 9a7232babfd763ccfe827bc70e82e0f50cfd8276 (patch) | |
tree | a39808b7482c4711a80f799a7281adb36d76a13a /library/cpp/charset/wide.h | |
parent | 0e68ae909d3b76a5a001a07880eb0010dec6b2ea (diff) | |
download | ydb-9a7232babfd763ccfe827bc70e82e0f50cfd8276.tar.gz |
Restoring authorship annotation for <kerzum@yandex-team.ru>. Commit 1 of 2.
Diffstat (limited to 'library/cpp/charset/wide.h')
-rw-r--r-- | library/cpp/charset/wide.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/library/cpp/charset/wide.h b/library/cpp/charset/wide.h index 32d30e849e..0fbdcacce1 100644 --- a/library/cpp/charset/wide.h +++ b/library/cpp/charset/wide.h @@ -1,5 +1,5 @@ #pragma once - + #include "codepage.h" #include "iconv.h" @@ -22,7 +22,7 @@ inline size_t WideToChar(const TCharType* text, size_t len, char* dest, ECharset const char* start = dest; - const Encoder* const encoder = &EncoderByCharset(enc); + const Encoder* const encoder = &EncoderByCharset(enc); const TCharType* const last = text + len; for (const TCharType* cur = text; cur != last; ++dest) { *dest = encoder->Tr(ReadSymbolAndAdvance(cur, last)); @@ -257,7 +257,7 @@ inline TUtf16String CharToWide(const char* text, size_t len, ECharset enc) { if (enc == CODES_UTF8) return UTF8ToWide<robust>(text, len); - return CharToWide(text, len, *CodePageByCharset(enc)); + return CharToWide(text, len, *CodePageByCharset(enc)); } TUtf16String w = TUtf16String::Uninitialized(len * 2); @@ -300,7 +300,7 @@ inline TUtf16String CharToWide(const TStringBuf s, ECharset enc) { inline TUtf16String CharToWide(const TStringBuf s, const CodePage& cp) { return CharToWide(s.data(), s.size(), cp); } - + // true if @text can be fully encoded to specified @encoding, // with possibility to recover exact original text after decoding bool CanBeEncoded(TWtringBuf text, ECharset encoding); |