I'm new to mongodb. I need to store some data in utf8 encoding in my DB. When I export them or see them into console, they don't display correctly. Can I set my database to utf8 character set to solve this problems? If yes, how can I do this?
MongoDB uses UTF-8 character encoding which is part of the Unicode Standard.
Click Tools, then select Web options. Go to the Encoding tab. In the dropdown for Save this document as: choose Unicode (UTF-8). Click Ok.
UTF-8 is a character encoding system. It lets you represent characters as ASCII text, while still allowing for international characters, such as Chinese characters.
UTF-8 supports any unicode character, which pragmatically means any natural language (Coptic, Sinhala, Phonecian, Cherokee etc), as well as many non-spoken languages (Music notation, mathematical symbols, APL). The stated objective of the Unicode consortium is to encompass all communications.
BSON
can only be encoded in UTF-8
. If your problem is with export and console, you probably are not converting your data to UTF-8
before uploading it to mongodb
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With