简体   繁体   中英

How can I insert hindi text in mysql?

I am using an linode ubuntu vps. I have not set up any display and am just accessing terminal through putty. I have created a database with encoding set to utf-8. How do I insert hindi text into the database? My research so far shows that i cannot enter hindi text on linux command line. If i create the text on my local pc and try to paste it on my mysql command line, all it shows is ????. I uploaded a file with hindi text created on windows and when viewed in vim it shows non readable text. I installed ttf-indic-fonts, even then no luck.

This is what i see for समय on linux in vim: समय

I put it in my web directory and when i view it as in browser, it shows in hindi. but on linux terminal i only see unreadable characters.

On vim, set file encoding to UTF8 and then change yur file.

:set fileencodings=utf-8

on vim and then save your file. It should display UTF8 characters

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