Closed zqben402 closed 7 years ago
root@7d23d3593134:/usr/share/elasticsearch# curl -s -XPOST localhost:9200/testindex/testdoc/ --data '{"thai-lang": "ทเว้นตี้ช๊อป ภูเวียง"}'
{"_index":"testindex","_type":"testdoc","_id":"AV0O7WedNbIzGY64QBNY","_version":1,"result":"created","_shards":{"total":2,"successful":1,"failed":0},"created":true}
root@7d23d3593134:/usr/share/elasticsearch# es2csv -i testindex -q '*' -o test.csv
Found 1 results
Run query [#####################################################################################################################################################################] [1/1] [100%] [0:00:00] [Time: 0:00:00] [210.4 docs/s]
Write to csv [###############################################################################################################################################################] [1/1] [100%] [0:00:00] [Time: 0:00:00] [ 1.5 Kilines/s]
root@7d23d3593134:/usr/share/elasticsearch# cat test.csv
thai-lang
ทเว้นตี้ช๊อป ภูเวียง
root@7d23d3593134:/usr/share/elasticsearch# uname -a
Linux 7d23d3593134 4.9.12-moby #1 SMP Tue Feb 28 12:11:36 UTC 2017 x86_64 GNU/Linux
root@7d23d3593134:/usr/share/elasticsearch# es2csv --version
es2csv 5.2.1
root@7d23d3593134:/usr/share/elasticsearch# elasticsearch --version
Version: 5.2.1, Build: db0d481/2017-02-09T22:05:32.386Z, JVM: 1.8.0_121
I have some field in ES that uses the Thai language.
After use the tool to extract , it become something unreadable.
ทเว้นตี้ช๊อป ภูเวียง -> ‡∏ó‡πć∏߇πâ‡∏ô‡∏ï‡∏µ‡πâ‡∏ä‡πä‡∏≠‡∏õ ‡∏†‡∏π‡πć∏߇∏µ‡∏¢‡∏á