On Fri, Aug 19, 2005 at 01:19:45PM -0700, Dave Mitchell via RT wrote:
> On Fri, Aug 19, 2005 at 04:49:28AM -0700, ismail @ uludag. org. tr wrote:
> > ===========================================
> > use POSIX;
> >
> > setlocale(LC_CTYPE, "tr_TR.UTF-8");
> > printf("%s %s\n", uc("abğıi"),lc("ABĞIİ"));
> > ===========================================
> >
> > outputs :
> >
> > ABğıI abĞiİ
> >
> > but it should output:
> >
> > ABĞIİ abğiı
>
> If you include literal utf8 characters in your program's source file, then
> you need to tell perl that it's utf8. Aslo, if you're printing utf8
> characters to STDOUT, you need to tell perl that STDOUT should be utf8:
>
> use POSIX;
>
> setlocale(LC_CTYPE, "tr_TR.UTF-8");
> use utf8;
> binmode STDOUT, ':utf8';
> printf("%s %s\n", uc("abğıi"),lc("ABĞIİ"));
>
> $ perl585 /tmp/x1
> ABĞII abğii̇
> $
Output is still wrong. It should be "ABĞIİ abğiı".Regards, ismail -- Biggest lies ever told : 1. The check is in the mail 2. Don't worry, I won't come in your mouth 3. We're from the government and we're here to help 4. This patent is only for defense
pgpsKIPRAXLIg.pgp
Description: PGP signature
