# Filename encodings for Ruby 1.9, more generic

**URL:** <https://www.ruby-forum.com/t/filename-encodings-for-ruby-1-9-more-generic/195988>\
**Category:** Ruby-Gnome 2\
**Created:** [October 4, 2010, 11:21pm UTC](https://www.ruby-forum.com/t/filename-encodings-for-ruby-1-9-more-generic/195988 "2010-10-04T23:21:43Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![blueprint](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/cc9497/32.png) [@blueprint](https://www.ruby-forum.com/u/blueprint)\
**Post date:** [October 4, 2010, 11:21pm UTC](https://www.ruby-forum.com/t/filename-encodings-for-ruby-1-9-more-generic/195988/1 "2010-10-04T23:21:43Z")

</div>

Hi Kouhei & all,

So I have commited the filename encodings for Ruby 1.9 patch on  
rbgtkfilechooser.c.

Now I think the moment is to make it more generic, because there are  
similar filename-related operations elsewhere.  
So I have moved the tool stuff from rbgtkfilechooser.c to glib2  
submodule, and also implemented the use of the new generic way in a  
first other file, rbglib\_bookmarkfile.c.

Please tell me what you think, thanks!

---

<div class="post-metadata">

**Author:** ![blueprint](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/cc9497/32.png) [@blueprint](https://www.ruby-forum.com/u/blueprint)\
**Post date:** [October 5, 2010, 4:50pm UTC](https://www.ruby-forum.com/t/filename-encodings-for-ruby-1-9-more-generic/195988/2 "2010-10-05T16:50:32Z")

</div>

Hi,

In [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
“[ruby-gnome2-devel-en] filename encodings for Ruby 1.9, more generic”  
on Mon, 4 Oct 2010 23:21:12 +0200,  
Guillaume C. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> So I have commited the filename encodings for Ruby 1.9 patch on  
> rbgtkfilechooser.c.

Thanks!!!

> Now I think the moment is to make it more generic, because there are  
> similar filename-related operations elsewhere.  
> So I have moved the tool stuff from rbgtkfilechooser.c to glib2  
> submodule, and also implemented the use of the new generic way in a  
> first other file, rbglib\_bookmarkfile.c.
> 
> Please tell me what you think, thanks!

I agree with your suggestion. I want you to commit your patch.  
(I’m sorry about I always care about small things but) Here  
are some comments:

(1) Please use "gchar _" style instead of "gchar_ " style.  
(2) Please define RVAL2XXX and XXX2RVAL macros and use them.

## Thanks for your contributions!

kou

---

<div class="post-metadata">

**Author:** ![blueprint](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/cc9497/32.png) [@blueprint](https://www.ruby-forum.com/u/blueprint)\
**Post date:** [October 5, 2010, 5:06pm UTC](https://www.ruby-forum.com/t/filename-encodings-for-ruby-1-9-more-generic/195988/3 "2010-10-05T17:06:56Z")

</div>

> > Please tell me what you think, thanks!
> 
> I agree with your suggestion. I want you to commit your patch.  
> (I’m sorry about I always care about small things but) Here

No problem about small things, as long as they make sense and your  
review is not taking a lot of days, it’s fine. I am glad if the code  
quality and consistency is high in ruby-gnome2.

> are some comments:
> 
> (1) Please use "gchar _" style instead of "gchar_ " style.  
> (2) Please define RVAL2XXX and XXX2RVAL macros and use them.

Ok!

By the way, you haven’t replied to my other mail, mainly about the  
change of HAVE\_RB\_STR\_ENCODE to HAVE\_RUBY\_ENCODING\_H in existing  
places?

–  
Guillaume C. - [Guillaume Cottenceau](http://zarb.org/~gc/)

---

<div class="post-metadata">

**Author:** ![blueprint](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/cc9497/32.png) [@blueprint](https://www.ruby-forum.com/u/blueprint)\
**Post date:** [October 7, 2010, 2:12pm UTC](https://www.ruby-forum.com/t/filename-encodings-for-ruby-1-9-more-generic/195988/4 "2010-10-07T14:12:17Z")

</div>

Hi,

In [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
“Re: [ruby-gnome2-devel-en] filename encodings for Ruby 1.9, more  
generic” on Tue, 5 Oct 2010 18:13:03 +0200,  
Guillaume C. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> > (1) Please use "gchar _" style instead of "gchar_ " style.  
> > (2) Please define RVAL2XXX and XXX2RVAL macros and use them.
> 
> can you review attached patch?

It seems good to me!  
Please commit it!

## Thanks,

kou

---

<div class="post-metadata">

**Author:** ![blueprint](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/cc9497/32.png) [@blueprint](https://www.ruby-forum.com/u/blueprint)\
**Post date:** [October 5, 2010, 6:13pm UTC](https://www.ruby-forum.com/t/filename-encodings-for-ruby-1-9-more-generic/195988/5 "2010-10-05T18:13:40Z")

</div>

> Â (1) Please use "gchar _" style instead of "gchar_ " style.  
> Â (2) Please define RVAL2XXX and XXX2RVAL macros and use them.

can you review attached patch?
