ruby_brace_glob_with_enc(const char *str, int flags, ruby_glob_func *func, VALUE arg, rb_encoding *enc)
{
    struct brace_args args;

    flags &= ~GLOB_VERBOSE;
    args.funcs.match = func;
    args.funcs.error = NULL;
    args.value = arg;
    args.flags = flags;
    return ruby_brace_expand(str, flags, glob_brace, (VALUE)&args, enc, Qfalse);
}
ruby_brace_glob_with_enc(const char *str, int flags, ruby_glob_func *func, VALUE arg, rb_encoding *enc)
{
    struct brace_args args;

    flags &= ~GLOB_VERBOSE;
    args.funcs.match = func;
    args.funcs.error = NULL;
    args.value = arg;
    args.flags = flags;
    return ruby_brace_expand(str, flags, glob_brace, (VALUE)&args, enc, Qfalse);
}