[MLUG] perl, postgres, and Russian UTF-8

Zbigniew Koziol softquake на gmail.com
Вт Май 13 02:35:56 MSD 2008


Alex,

Thanks for reply. Actually I found myself how to solve my problem 5
minutes after posting to this list... and the solution was trivial:
binmode STDIN,":utf8";
;)
It makes however sense to ask questions, I noticed, because by asking
one moblizes grey cells in mind to increased activity ;)

2008/5/11 Alexus Black <alexusblack на gmail.com>:
> Hi Zb I'm perl programmer , as I know in Linux it work's , and in perl/tk I
> use :
> use utf8;
>
> It work and I haven't any problems with it in my aps.
>
> P.S. sorry for my English

Sorry for mine and for not writing in Russian (which I can read and
understand very well) ;) But the list is not very active so i thought
that I  will make some noise around.

Regards,
zb.

> 10 мая 2008 г. 2:02 пользователь Zbigniew Koziol <softquake на gmail.com>
> написал:
>>
>> Уважаемые,
>>
>> As some of you may remember, I am going to live in Russia some day
>> soon. I know Russian but I can not type.
>>
>> I am quite good in perl. But I had no idea that it is so enormously
>> difficult to program in perl when using UTF-8 encoding. I learn that
>> slowly and painfully. Actually, the problem concerns, probably, also
>> other programming languages, possibly PHP too, and other as well. What
>> may be obvious for many of you is not obvious to me, however.
>>
>> I was thinking that there must be good perl programmers here on this
>> list who already know solutions to problems and these solutions might
>> even be obvious for them. Thats why I am asking.
>>
>> Are there perhaps libraries/packages around that help to deal with
>> UTF-8 and perl, especially in context of Russian language? For
>> instance, I would happily use an existing library for converting to
>> uppercase or lowercase (actually, these I already wrote myself; this
>> is just an example).  But another example: how to take a substring of
>> a string when input string may contain both UTF-8 Russian characters
>> and ASCII ? Thats very tricky! Postgres for instance expects fixed
>> length strings for varchar but I see that I can not just cut the
>> string after fixed length bytes because that will often cut one of
>> bytes that belongs to two-byte code and smart postgres programmers do
>> not allow inserting a s*hit to database...
>>
>> I would appreciate some advise.
>>
>> zb.
>> _______________________________________________
>> MLUG (http://moscow.lug.ru) mailing list
>> MLUG на UnixCenter.RU
>> http://lists.unixcenter.ru/mailman/listinfo/mlug
>
>
> --
> С уважением Чернов Александр .
> _______________________________________________
> MLUG (http://moscow.lug.ru) mailing list
> MLUG на UnixCenter.RU
> http://lists.unixcenter.ru/mailman/listinfo/mlug
>


Подробная информация о списке рассылки MLUG