Disable character’s replace in search

Try to change collation with the following code in functions.php

add_filter( 'posts_search_orderby', 'alter_query', 20, 2 );
function alter_query( $orderby, $query ) {
    return $orderby . ' COLLATE latin1_general_ci';
}