librelist archives

« back to archive

Uninitialized constant Encoding::UTF_16BE with 'CGI'

Uninitialized constant Encoding::UTF_16BE with 'CGI'

From:
i5m
Date:
2010-01-29 @ 13:28
ashbb and all,

Ok, I've tracked it down. I've not attempted to fix the issue yet though.
Please see this gist / sample app:

http://gist.github.com/289714

<http://gist.github.com/289714>This app works fine in Shoes 2. With Shoes 3
it throws an "Uninitialized constant Encoding::UTF_16BE". The error seems to
be with CGI, in particular:

shoes/dist/ruby/lib/cgi/util.rb

and lines 15 to 20 (although this is just for this small sample app, the
whole issue is probably bigger).

I've only checked on Windows so far.
-----------------------
i5m.co.uk
GPG Key: 0xA18A602B


On Fri, Jan 29, 2010 at 10:53 AM, i5m <i5ivem@googlemail.com> wrote:

>
>
> I spoke too soon.  Although ashbb's fixes do solve the sample Mechanize
> problem I was having, I am still having encoding issues in my actual app.
>
> Error on <unknown> line 0 "uninitialised constant Encoding::UTF_16BE
>
> Unfortunately I don't have any more information yet. I need to track down
> where the error is occurring in my app and then in Shoes. But this is just
> to let you know we've not got to the bottom of the encoding issues yet :-(
>

Re: Uninitialized constant Encoding::UTF_16BE with 'CGI'

From:
i5m
Date:
2010-01-29 @ 13:42
Ooops,

a correction:

On Fri, Jan 29, 2010 at 1:28 PM, i5m <i5ivem@googlemail.com> wrote:

> The error seems to be with CGI, in particular:
>
> shoes/dist/ruby/lib/cgi/util.rb
>
> and lines 15 to 20 (although this is just for this small sample app, the
> whole issue is probably bigger).
>

The problem is lines 37+ in util.rb

Commenting out lines 42 to 55 fixes the problem. But is it a proper fix?
-----------------------
i5m.co.uk
GPG Key: 0xA18A602B