Re: unicode in a liststore

2015-03-06 Thread Brian Manning
On Fri, Mar 6, 2015 at 3:20 PM, Daniel Kasak  wrote:
> If I can actually get valid unicode out of a database, I'm *still* having
> issues pushing it into a liststore. Things get corrupted. I've modified
> liststore.pl from https://github.com/dave-theunsub/gtk3-perl-demos and
> uploaded the changed version to:
>
> http://tesla.duckdns.org/downloads/unicode_in_liststore.pl
>
> Near the top, I've appended another row for the liststore, with the unicode
> string:
>
> Gestión

It's actually not a Gtk3 thing, it's a Perl thing.

https://gist.github.com/cpanxaoc/7d4fcd98e3c580527246

Note line #12 of that gist.  Just for shits and giggles, I changed
some of your strings output in the liststore to add more UTF-8-ness.
Perl 5.20.2, Gtk3 0.021, Glib 1.310 on Mac OS X Mavericks (10.9.5).

From http://perldoc.perl.org/perlunicode.html:

"As a compatibility measure, the use utf8 pragma must be explicitly
included to enable recognition of UTF-8 in the Perl scripts themselves
(in string or regular expression literals, or in identifier names) on
ASCII-based machines or to recognize UTF-EBCDIC on EBCDIC-based
machines. These are the only times when an explicit use utf8 is
needed. See utf8."

I thought the above became the default at some point, but according to
the current docs, you still need the 'use utf8;' pragma.

As far as the database, I would ask if you've enabled UTF-8 everywhere
that you possibly can.  Also, I've had this happen to me in the past,
things I expected to be UTF-8 sometimes weren't; if you get high-byte
ASCII in your data, most UTF-8 string handling routines will become
very unhappy.

Thanks,

Brian
___
gtk-perl-list mailing list
gtk-perl-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-perl-list


unicode in a liststore

2015-03-06 Thread Daniel Kasak
Hi all.

I'm battling unicode issues on multiple fronts :/ 1 front is in unixODBC,
but that's another story.

If I can actually get valid unicode out of a database, I'm *still* having
issues pushing it into a liststore. Things get corrupted. I've modified
liststore.pl from https://github.com/dave-theunsub/gtk3-perl-demos and
uploaded the changed version to:

http://tesla.duckdns.org/downloads/unicode_in_liststore.pl

Near the top, I've appended another row for the liststore, with the unicode
string:

Gestión

This doesn't get rendered properly for me. Is there something special I'm
supposed to do for unicode in Gtk3?

Dan
___
gtk-perl-list mailing list
gtk-perl-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-perl-list