How to change encoding in cbimport?

couchbase 7.0 beta


$ cbimport csv -c couchbase:// -u Administrator -p password -b test -d file://C:/Users/Desktop/test.csv -g key::asdf -t 2

I put the csv file as a document through cbimport.

However, due to the Encoding problem, the Korean alphabet was broken as follows.

I want to change the encoding to UTF-8. Don’t you apply yet?

how to change encoding in cbimport?

Thank you.

Hello @leech ,

That feels like a bug. I’m wondering if it’s the UI or cbimport as you pointed out. Would it be possible to share the file or the Korean characters, so I can reproduce this issue.


Hello, @pvarley .

Thank you for trying to help,

I am attaching the csv file that I used. (277 Bytes)

In addition, when I tried to insert the document’s ID in Korean, an error occurred as follows.

i used this command.

cbimport csv -c couchbase:// -u Administrator -p password -b test -d file://C:/Users/leech/Desktop/test.csv -g key::asdf -t 2

Is it a bug, not an encoding problem?

I’ll be waiting for your help.

Thank you.

Hello @leech ,

The test.csv file provided is using “ISO-8859” and as such does not support the Korean characters:

$ file test.csv 
test.csv: ISO-8859 text, with CRLF line terminators

When the file is open using less it’s reported as having binary data:

 $ less test.csv 
"test.csv" may be a binary file.  See it anyway? 

Once opened in less the data is not printed correctly:


The CSV is not using the correct encoding. Can it be recreate using UTF-8 encoding?

I have tested the following file which is encoded UTF-8 with Korean characters:

이름이 뭐예요,60
$ file test-2.csv 
test-2.csv: UTF-8 Unicode text

This is how the UI looks:

I hope this helps.

1 Like

Hello @pvarley .

The problem was the encoding of the csv file. Thank you.

my mistake.

Thank you for your kind help.

Have a good day.