Re: No Gtk2 and no Perl utf8 bug



On Sun, Sep 05, 2004 at 11:30:55 +0200, Jörn Reder wrote:
Jan Hudec wrote:

Ok. So I want one thing. If I encode a script in unicode, I want all
string literals to behave the same and have the utf8 flag set. But some
of them happen not to contain any non-ascii characters. Now, how do I do
this?

I fear that's not possible. 'use utf8' enables the utf8 flag only for 
literals which contain bytes with the 8th bit set. 7bit characaters are
left without utf8 flag set.

But why do you want to have all you variables utf8 tagged? In general 
you don't need to care about the utf8 flag, because Perl upgrades the 
variable when needed. (besides the fact, that there may still be bugs in
Perl's internal utf8 handling... ;)

The utf8 flag only becomes important when you're doing I/O, write to 
filehandles or pass arguments to external programs etc.. E.g. you need 
to apply the correct encoding layer to all your filehandles, otherwise 
Perl can't do the right thing for you.

Um, yes. It shouldn't matter whether the strings, that are pure ascii,
are marked utf8 or not. (If there were no bugs in the handling). Since
the conversion is nop on them. 

What is a little problem is, that there is no standard module to do the
I/O stream setting in a reasonably automagic way, like eg. tcl does.
Basicaly you have to set all the streams manualy.

-------------------------------------------------------------------------------
                                                 Jan 'Bulb' Hudec <bulb ucw cz>

Attachment: signature.asc
Description: Digital signature



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]