简体   繁体   中英

How to display UTF-8 characters in RAILS CONSOLE?

I am trying to display UTF-8 characters, in particular characters from the Tamil language, in the Rails Console.

Currently, my entries in my MongoDB database are displayed in the Rails console as follows: "_____" .

On my Rails application, ie localhost, however, I see the actual Tamil characters: ie அம்மா .

Now I wonder what I can do to display the UTF-8 characters in the Rails console using a Windows machine. I have tried installing the 'rb-readline' gem, however, it is not solving my problem. Any suggestions?

This isn't exactly a Rails issue. You might need to update the encoding of Windows command line.

Change the code page ,

chcp 65001

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM