douzuizhuo0587 2013-08-19 19:57 采纳率: 0%
浏览 45

使用utf8编码在mysql中搜索

im working on a project in Arabic language i need to search in database of utf-8 words the table Collation in ' utf8' and MySQL connection type is utf8 too.

now when i type the word (for example 'ﺗﻮﺿﻴﺢ') in my query string with my keyboard it cant find some of the results BUT when i try to copy and paste from phpmyadmin i find all of the results!!

image 1 shown the result when i will type by my keyborad image 1 shown the result when i will type by my keyborad

and image 2 shown the result in same database when i will copy and paste the search term

result in same database when i will copy and paste the search term

question is what is the problem and how can i type to search term to find all of the results...

PS: 1)i have to attache both post content first is for copy and paste text and second is for when i will typing the text

i found this differentiation between my post queries

when i copy the text :

is_js_confirmed=0&db=digidoc&table=docs_pages&token=43847946c2deb1885e9c0f9ed97839a3&pos=0&goto=tbl_sql.php&message_to_show=Your+SQL+query+has+been+executed+successfully&prev_sql_query=SELECT+*+FROM+%60docs_pages%60+WHERE+%60page_content%60+LIKE+'%25%EF%BA%97%EF%BB%AE%EF%BA%BF%EF%BB%B4%EF%BA%A2%25'&sql_query=SELECT+*+FROM+%60docs_pages%60+WHERE+%60page_content%60+LIKE+'%25%EF%BA%97%EF%BB%AE%EF%BA%BF%EF%BB%B4%EF%BA%A2%25'&bkm_label=&sql_delimiter=%3B&show_query=1&ajax_request=true 

and when i will type it :

is_js_confirmed=0&db=digidoc&table=docs_pages&token=43847946c2deb1885e9c0f9ed97839a3&pos=0&goto=tbl_sql.php&message_to_show=Your+SQL+query+has+been+executed+successfully&prev_sql_query=SELECT+*+FROM+%60docs_pages%60+WHERE+%60page_content%60+like+'%25%2525%25EF%25BA%2597%25EF%25BB%25AE%25EF%25BA%25BF%25EF%25BB%25B4%25EF%25BA%25A2%2525%25'&sql_query=SELECT+*+FROM+%60docs_pages%60+WHERE+%60page_content%60+like+'%D8%AA%D9%88%D8%B6%DB%8C%D8%AD'&bkm_label=&sql_delimiter=%3B&show_query=1&ajax_request=true

but why!? the same chars in same browser!

  • 写回答

0条回答 默认 最新

    报告相同问题?

    悬赏问题

    • ¥15 如何在scanpy上做差异基因和通路富集?
    • ¥20 关于#硬件工程#的问题,请各位专家解答!
    • ¥15 关于#matlab#的问题:期望的系统闭环传递函数为G(s)=wn^2/s^2+2¢wn+wn^2阻尼系数¢=0.707,使系统具有较小的超调量
    • ¥15 FLUENT如何实现在堆积颗粒的上表面加载高斯热源
    • ¥30 截图中的mathematics程序转换成matlab
    • ¥15 动力学代码报错,维度不匹配
    • ¥15 Power query添加列问题
    • ¥50 Kubernetes&Fission&Eleasticsearch
    • ¥15 報錯:Person is not mapped,如何解決?
    • ¥15 c++头文件不能识别CDialog