Use rb_enc_get()
to retrieve encoding type
#685
Merged
rb_enc_get()
to retrieve encoding type
#685