Russian word search does not work

Config

source nahodu_announcement { type = mysql sql_host = localhost sql_user = root sql_pass = sql_db = myDb sql_port = 3306 # optional, default is 3306 sql_query_pre = SET NAMES utf8 sql_query_pre = SET CHARACTER_SET_RESULTS=utf8 sql_query = \ SELECT id, title \ FROM announcement WHERE status='enabled' sql_ranged_throttle = 0 sql_query_info = SELECT id, title FROM announcement WHERE id = $id } index nahodu_announcement { source = nahodu_announcement path = /var/www/nahodu.local/frontend/runtime/sphinx/announcement/index docinfo = extern mlock = 0 morphology = stem_ru min_word_len = 1 charset_type = utf-8 #charset_table = 0..9, A..Z->a..z, _, a..z, U+A8->U+B8, U+B8, U+C0..U+DF->U+E0..U+FF, U+E0..U+FF #charset_table = 0..9, A..Z->a..z, _, a..z, U+410..U+42F->U+430..U+44F, U+430..U+44F # min_prefix_len = 0 min_infix_len = 1 # prefix_fields = filename # infix_fields = url, domain enable_star = 1 html_strip = 1 } searchd { listen = 127.0.0.1:9306:mysql41 log = /var/log/sphinxsearch/searchd.log query_log = /var/log/sphinxsearch/query.log pid_file = /var/run/sphinxsearch/searchd.pid read_timeout = 5 max_children = 30 max_matches = 1000 seamless_rotate = 1 preopen_indexes = 0 unlink_old = 1 } 

I make a request to the database

  $sql = 'SELECT * FROM announcement WHERE title LIKE %Про%'; 

returns an empty array, if I pass the word in English, then everything works. When searching from the console, it returns question marks instead of words. There is clearly a problem with the encoding

enter image description here

enter image description here

    2 answers 2

    Are you sure that
    1. DB has a UTF-8 encoding type
    2. The UTF-8 encoding type was registered in the Sphinx config
    3. The correct charset_table for UTF-8 was written in the Sphinx config
    4. The request must also arrive in UTF-8

    • I laid out the configs, all in utf-8. - gudfar

    The problem was that I did not add START=yes to /etc/default/sphinxsearch