From 809b3ebc0b44f093ce03adb2423a4016cb52178d Mon Sep 17 00:00:00 2001 From: Pavel Kartavyy Date: Fri, 6 Sep 2013 08:41:19 +0000 Subject: [PATCH] benchmark: added util to correct non-utf symbols [#CONV-8419] --- utils/corrector_utf8/corrector_utf8.cpp | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 utils/corrector_utf8/corrector_utf8.cpp diff --git a/utils/corrector_utf8/corrector_utf8.cpp b/utils/corrector_utf8/corrector_utf8.cpp new file mode 100644 index 00000000000..7252dba9d2a --- /dev/null +++ b/utils/corrector_utf8/corrector_utf8.cpp @@ -0,0 +1,15 @@ +#include + +#include +#include +#include +#include + +int main(int argc, char **argv) +{ + DB::ReadBufferFromFileDescriptor rb(STDIN_FILENO); + DB::WriteBufferFromFileDescriptor wb(STDOUT_FILENO); + DB::WriteBufferValidUTF8 utf8_b(wb); + DB::copyData(rb, utf8_b); + return 0; +}