diff options
author | Daniil Cherednik <dan.cherednik@gmail.com> | 2023-03-31 10:54:08 +0300 |
---|---|---|
committer | Daniil Cherednik <dan.cherednik@gmail.com> | 2023-03-31 12:28:07 +0300 |
commit | fc1cffcfa7f0497a1f97b384a24bcbf23362f3be (patch) | |
tree | c15f7ab5b9e9b20fd0ef8fc07d598d28e8b32004 /library/cpp/charset/iconv.cpp | |
parent | 8a749596d40e91c896a1907afcd108d9221fbde1 (diff) | |
download | ydb-fc1cffcfa7f0497a1f97b384a24bcbf23362f3be.tar.gz |
Ydb stable 23-1-1923.1.19
x-stable-origin-commit: c5d5a396e89d0a72e0267a55e93d8404d4fb54fe
Diffstat (limited to 'library/cpp/charset/iconv.cpp')
-rw-r--r-- | library/cpp/charset/iconv.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/library/cpp/charset/iconv.cpp b/library/cpp/charset/iconv.cpp index dc604c8492..0b6dbace9e 100644 --- a/library/cpp/charset/iconv.cpp +++ b/library/cpp/charset/iconv.cpp @@ -5,20 +5,22 @@ using namespace NICONVPrivate; TDescriptor::TDescriptor(const char* from, const char* to) - : Descriptor_(libiconv_open(to, from)) + : Descriptor_(iconv_open(to, from)) , From_(from) , To_(to) { +#if defined(USE_ICONV_EXTENSIONS) if (!Invalid()) { int temp = 1; libiconvctl(Descriptor_, ICONV_SET_DISCARD_ILSEQ, &temp); } +#endif } TDescriptor::~TDescriptor() { if (!Invalid()) { - libiconv_close(Descriptor_); + iconv_close(Descriptor_); } } @@ -31,7 +33,7 @@ size_t NICONVPrivate::RecodeImpl(const TDescriptor& descriptor, const char* in, char* outPtr = out; size_t inSizeMod = inSize; size_t outSizeMod = outSize; - size_t res = libiconv(descriptor.Get(), &inPtr, &inSizeMod, &outPtr, &outSizeMod); + size_t res = iconv(descriptor.Get(), &inPtr, &inSizeMod, &outPtr, &outSizeMod); read = inSize - inSizeMod; written = outSize - outSizeMod; |