Ensure to set encoding before returning
Add dummy encoding related capi specs
Find index by the encoding name, not onig encoding name