    /*
     *  call-seq:
     *     Ferret.locale = "en_US.UTF-8"
     *
     *  Set the global locale. You should use this method to set different locales
     *  when indexing documents with different encodings.
     */
    static VALUE frb_set_locale(VALUE self, VALUE locale)
    {
        char *l = ((locale == Qnil) ? NULL : rs2s(rb_obj_as_string(locale)));
        frb_locale = setlocale(LC_CTYPE, l);
        return frb_locale ? rb_str_new2(frb_locale) : Qnil;
    }