How can I show arabic query search from MYSQL by JavaFX?

我的未来我决定 提交于 2019-12-02 19:17:02

问题


SELECT * FROM `employee` WHERE `name` LIKE "%شريف%"

Above query works fine and find the element by phpmyAdmin query but using it inside JavaFX doesn't get it. And get the english searchs, So what I need to add in java to permit me search by Arabic.


回答1:


As per my above comments, I guess it to be a encoding - decoding issue of Java and has nothing specific to do with JavaFX and I also assume that you are not getting any exceptions. You have to use a proper standard while inserting as well as retrieving data. Helpful information is there at , How to store arabic text in mysql database using python?

Refer this article to work only on bytes so your application is always properly internationalized , Byte Encodings and Strings

Refer this one too as how to set encoding in Java , How can I insert arabic word to mysql database using java

Your console might be UTF8 enabled so you are able to match strings there and see Arabic characters.

Hope it helps.



来源:https://stackoverflow.com/questions/34113606/how-can-i-show-arabic-query-search-from-mysql-by-javafx

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!