Do you know what might be the reason why, when printing into a file the result of a js executed through mongo shell, in any string literal, it replaces characters like í, é, ó with something like aÃa, I’m using the mongo shell version 4.2.5. I’d like to note that same version of mongo shell, running in a different computer prints these characters accurately.
BSON, and by extension MongoDB, supports unicode text. I’m guessing that if it works in one computer but not another, the failing case is most likely the terminal software or something connected to it. Perhaps it’s using the wrong codepage, the wrong font, or the terminal software itself doesn’t support unicode. Please consult the manual for the terminal on how to handle unicode font/format, as I don’t believe this was caused by MongoDB in particular.