[tpm] ucfirst() and unicode

Liam R E Quin liam at holoweb.net
Wed Apr 7 04:46:37 PDT 2010

On Tue, 2010-04-06 at 15:14 -0400, Digimer wrote:

>    There isn't an example of a compatible ucfirst() alternative,

use locale;
should be enough.

$input =~ s{^([[:lower:]])}\u$1};
should also work.

Note that when reading/writing UTF-8 you have to use
binmode($filehandle, ":utf8");


Liam Quin - XML Activity Lead, W3C, http://www.w3.org/People/Quin/
Pictures from old books: http://fromoldbooks.org/
Ankh: irc.sorcery.net irc.gnome.org www.advogato.org

More information about the toronto-pm mailing list