monjoshi has asked for the wisdom of the Perl Monks concerning the following question:

Question 1: Does perl pragma locale and sprintf supports read/display of multibyte characters from native languages appropriately.. Can I relay on them to provide NLS support for my modules ?

I experimented using 'use locale;' in my perl scripts. I created an XML property file and parsed it on sometag called 'message_id', the printed the return 'message string' using sprintf. I had not preserved the code..reason for not posting here

Question 2: Is there any benefit using perl 'Maketext' over pragma locale?

download

Replies are listed 'Best First'.
Re: Locale pragma vs Maketext
by ikegami (Patriarch) on Jan 05, 2010 at 15:42 UTC
    The locale pragma has nothing to do with encoding ("displaying") characters. The simplest approach is
    use open ':std', ':locale';
Re: Locale pragma vs Maketext
by JavaFan (Canon) on Jan 05, 2010 at 13:17 UTC
    Using locales comes with their own set of pain, and throws you at the mercy of whatever is installed on your system.

    I've no idea why you would want to use locale to do XML stuff with - AFAIK, XML implies Unicode. And if you're doing Unicode, you shouldn't do locales.

    As for your second question, AFAIK, Maketext and locale do different things. I don't see how one would replace the one with the other.