add sm_finish_query && utf8 support

add support utf8
add new method sm_finish_query