in reply to Re: ucfirst doesn't work if first character of word a special finnish character
in thread ucfirst doesn't work if first character of word a special finnish character

Hi!

I tried with this, but still it doesn't work.

----------

use locale; use POSIX qw(locale_h); setlocale(LC_CTYPE, 'fi_FI'); setlocale(LC_COLLATE, 'fi_FI'); print ucfirst "äbcdef";

-----------

But it prints "-bcdef" i.e "ä" is not being printed correctly.

Do I need to do anything else?

Thanks.

Edited by planetscape - added code tags and rudimentary formatting

( keep:0 edit:11 reap:0 )

  • Comment on Re^2: ucfirst doesn't work if first character of word a special finnish character
  • Download Code

Replies are listed 'Best First'.
Re^3: ucfirst doesn't work if first character of word a special finnish character
by Mutant (Priest) on Oct 03, 2006 at 12:45 UTC
    Are you printing directly to STDOUT? It may just be that wherever you're printing it to is unable to display the character correctly.
      Hi! Yes, I am directly printing it to STDOUT. Can't I do that? Thanks,
        You can print to STDOUT, but if STDOUT happens to be e.g. a DOS window, it may not display all characters properly. Make sure whatever you're displaying the characters on will normally display that character correctly.