    /*
     *  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 frt_set_locale(VALUE self, VALUE locale)
    {
        char *l = ((locale == Qnil) ? NULL : rs2s(rb_obj_as_string(locale)));
        frt_locale = setlocale(LC_CTYPE, l);
        return frt_locale ? rb_str_new2(frt_locale) : Qnil;
    }