mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-21 15:12:02 +00:00
benchmark: added util to correct non-utf symbols [#CONV-8419]
This commit is contained in:
parent
c7d8723a54
commit
809b3ebc0b
15
utils/corrector_utf8/corrector_utf8.cpp
Normal file
15
utils/corrector_utf8/corrector_utf8.cpp
Normal file
@ -0,0 +1,15 @@
|
||||
#include <iostream>
|
||||
|
||||
#include <DB/IO/WriteBufferFromFileDescriptor.h>
|
||||
#include <DB/IO/ReadBufferFromFileDescriptor.h>
|
||||
#include <DB/IO/WriteBufferValidUTF8.h>
|
||||
#include <DB/IO/copyData.h>
|
||||
|
||||
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;
|
||||
}
|
Loading…
Reference in New Issue
Block a user