# More string encodings

**URL:** <https://www.ruby-forum.com/t/more-string-encodings/196174>\
**Category:** Ruby-Gnome 2\
**Created:** [October 7, 2010, 10:57pm UTC](https://www.ruby-forum.com/t/more-string-encodings/196174 "2010-10-07T22:57:27Z")\
**Posts on this page:** 9\
**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 7, 2010, 10:57pm UTC](https://www.ruby-forum.com/t/more-string-encodings/196174/1 "2010-10-07T22:57:27Z")

</div>

the attached patch fixes more string encodings in places currently  
using rb\_str\_new\* or StringValuePtr.

i have reviewed glib2, pango, gdkpixbuf and gtk2. i know too little  
other modules to review them for the same thing, sorry.

please review?

---

<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 8, 2010, 12:31am UTC](https://www.ruby-forum.com/t/more-string-encodings/196174/2 "2010-10-08T00:31:05Z")

</div>

Hi,

In [AANLkTikFsOjm5RnbakC=removed\_email\_address@domain.invalid](mailto:AANLkTikFsOjm5RnbakC=removed_email_address@domain.invalid)  
“[ruby-gnome2-devel-en] more string encodings” on Thu, 7 Oct 2010  
22:57:05 +0200,  
Guillaume C. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> the attached patch fixes more string encodings in places currently  
> using rb\_str\_new\* or StringValuePtr.
> 
> i have reviewed glib2, pango, gdkpixbuf and gtk2. i know too little  
> other modules to review them for the same thing, sorry.
> 
> please review?

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 9, 2010, 12:25am UTC](https://www.ruby-forum.com/t/more-string-encodings/196174/3 "2010-10-09T00:25:38Z")

</div>

On 9 October 2010 06:16, Guillaume C. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
wrote:

> Now, do you know what else needs to be done to support Ruby 1.9  
> Strings in rg2? As for me, my “booh” application seems to work  
> properly now.

By the way, thank you for doing all this!!! Probably with this I’ll be  
able  
to move my app over to 1.9 (if I can find time!) It’s something I have  
wanted to do for a long time. I really appreciate it 🙂

```
    MikeC

```

---

<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 8, 2010, 11:17pm UTC](https://www.ruby-forum.com/t/more-string-encodings/196174/4 "2010-10-08T23:17:09Z")

</div>

> > please review?
> 
> It seems good to me.  
> Please commit it!

Done.

Now, do you know what else needs to be done to support Ruby 1.9  
Strings in rg2? As for me, my “booh” application seems to work  
properly now.

Thanks,

–  
Guillaume C. - [NVC Communication Obstacles Game](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 10, 2010, 2:39am UTC](https://www.ruby-forum.com/t/more-string-encodings/196174/5 "2010-10-10T02:39:53Z")

</div>

On Sat, Oct 9, 2010 at 12:24 AM, Mike C. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
wrote:

> On 9 October 2010 06:16, Guillaume C. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:
> 
> > Now, do you know what else needs to be done to support Ruby 1.9  
> > Strings in rg2? As for me, my “booh” application seems to work  
> > properly now.
> 
> By the way, thank you for doing all this!!! Probably with this I’ll be able  
> to move my app over to 1.9 (if I can find time!) It’s something I have  
> wanted to do for a long time. I really appreciate it 🙂

You’re welcome. I wanted to ask others to test their app with rg2-svn  
and ruby 1.9, so that we know if there are more things to do before  
officially pretending rg2 is ruby 1.9 compatible. So please test with  
rg2-svn and report back!

Thanks,

–  
Guillaume C. - [NVC Communication Obstacles Game](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 10, 2010, 2:40am UTC](https://www.ruby-forum.com/t/more-string-encodings/196174/6 "2010-10-10T02:40:28Z")

</div>

On 10 October 2010 00:14, Guillaume C. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
wrote:

> So please test with  
> rg2-svn and report back!

I will definitely do so. I actually have some 1.9 encoding issues  
of my own to tackle, though. It might take me a while 🙂  
I’ll try to get back to you tomorrow.

```
      MikeC

```

---

<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 10, 2010, 10:46pm UTC](https://www.ruby-forum.com/t/more-string-encodings/196174/7 "2010-10-10T22:46:56Z")

</div>

On Sun, Oct 10, 2010 at 2:11 AM, Mike C. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
wrote:

> On 10 October 2010 00:14, Guillaume C. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:
> 
> > So please test with  
> > rg2-svn and report back!
> 
> I will definitely do so. I actually have some 1.9 encoding issues  
> of my own to tackle, though. It might take me a while 🙂

do you have C code? otherwise, pure ruby code should be easily  
“ported” to 1.9 with encodings? do you want to share what’s the  
problems?

–  
Guillaume C. - [NVC Communication Obstacles Game](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 11, 2010, 3:53am UTC](https://www.ruby-forum.com/t/more-string-encodings/196174/8 "2010-10-11T03:53:35Z")

</div>

On 11 October 2010 05:46, Guillaume C. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
wrote:

> do you have C code? otherwise, pure ruby code should be easily  
> “ported” to 1.9 with encodings? do you want to share what’s the  
> problems?

No it’s ruby code, but I read in files of many different encodings  
and specifically detect and modify the encodings of the strings.  
All that stuff has changed. It’s not difficult, but I just have to  
find time to do it 🙂 My programming time is limited to only  
a few hours a week unfortunately…

```
   MikeC

```

---

<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 10, 2010, 3:56am UTC](https://www.ruby-forum.com/t/more-string-encodings/196174/9 "2010-10-10T03:56:05Z")

</div>

2010/10/9 Guillaume C. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid):

> You’re welcome. I wanted to ask others to test their app with rg2-svn  
> and ruby 1.9, so that we know if there are more things to do before  
> officially pretending rg2 is ruby 1.9 compatible. So please test with  
> rg2-svn and report back!
> 
> Thanks,

I have test ZiK with ruby 1.9.1. Everything seems all rigth except for  
a segmentation fault when I close the application.  
See reported bug :

> **[Ruby-GNOME 2 / Bugs / #148 Segmentation fault](https://sourceforge.net/p/ruby-gnome2/bugs/148/)**

.  
Mor info on [http://redmine.ruby-lang.org/issues/show/319](http://redmine.ruby-lang.org/issues/show/319) .

P.S. : Maybe we should move this conversation to a new one.

–  
Vincent C.
