Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

locale(3perl) [debian man page]

locale(3perl)						 Perl Programmers Reference Guide					     locale(3perl)

NAME
locale - Perl pragma to use and avoid POSIX locales for built-in operations SYNOPSIS
@x = sort @y; # ASCII sorting order { use locale; @x = sort @y; # Locale-defined sorting order } @x = sort @y; # ASCII sorting order again DESCRIPTION
This pragma tells the compiler to enable (or disable) the use of POSIX locales for built-in operations (LC_CTYPE for regular expressions, and LC_COLLATE for string comparison). Each "use locale" or "no locale" affects statements to the end of the enclosing BLOCK. See perllocale for more detailed information on how Perl supports locales. perl v5.14.2 2010-12-30 locale(3perl)

Check Out this Related Man Page

locale(3pm)						 Perl Programmers Reference Guide					       locale(3pm)

NAME
locale - Perl pragma to use or avoid POSIX locales for built-in operations SYNOPSIS
@x = sort @y; # Unicode sorting order { use locale; @x = sort @y; # Locale-defined sorting order } @x = sort @y; # Unicode sorting order again DESCRIPTION
This pragma tells the compiler to enable (or disable) the use of POSIX locales for built-in operations (for example, LC_CTYPE for regular expressions, LC_COLLATE for string comparison, and LC_NUMERIC for number formatting). Each "use locale" or "no locale" affects statements to the end of the enclosing BLOCK. Starting in Perl 5.16, a hybrid mode for this pragma is available, use locale ':not_characters'; which enables only the portions of locales that don't affect the character set (that is, all except LC_COLLATE and LC_CTYPE). This is useful when mixing Unicode and locales, including UTF-8 locales. use locale ':not_characters'; use open ":locale"; # Convert I/O to/from Unicode use POSIX qw(locale_h); # Import the LC_ALL constant setlocale(LC_ALL, ""); # Required for the next statement # to take effect printf "%.2f ", 12345.67' # Locale-defined formatting @x = sort @y; # Unicode-defined sorting order. # (Note that you will get better # results using Unicode::Collate.) See perllocale for more detailed information on how Perl supports locales. NOTE
If your system does not support locales, then loading this module will cause the program to die with a message: "Your vendor does not support locales, you cannot use the locale module." perl v5.18.2 2013-11-04 locale(3pm)
Man Page

15 More Discussions You Might Find Interesting

1. Solaris

Couldn't set locale correctly

Hello, I have a recently configured machine that when log into it as a user or remotely as root it displays "Couldn't set locale correctly" When I type locale it displays the below which is wrong compared to other machines LC_CTYPE="C" LC_NUMERIC="C" LC_TIME="C" LC_COLLATE="C"... (7 Replies)
Discussion started by: Mr Pink
7 Replies

2. Solaris

Locale installation..

Hi All, I need to install a swedish locale on a solaris machine(ver. 10).I have the package downloaded.Can anyone please guide me through the steps and things i need to keep in mind when doing the same? (7 Replies)
Discussion started by: sankasu
7 Replies

3. Solaris

I can't set locale in Solaris 8

Hi gentlemen. I would change LANG=C to iso_8859_5. I have tried some variante, but it doesn't work. Thanks. (24 Replies)
Discussion started by: wolfgang
24 Replies

4. Solaris

Installing Hong Kong Locale

Any help appreciated. I am connecting (FTP) to a NAS PRO box that is currently installed on one of our subnets in Hong Kong from a Solaris system running Solaris 10 (our backup server). The NAS box has a backup job that backs up all user documents locally. I am trying to ftp the docs from the NAS... (4 Replies)
Discussion started by: jamba1
4 Replies

5. Programming

How will the behaviour of multibyte char differ because of different LC_CTYPE locale?

I am comparing two multibyte characters in two different platforms having different LC_CTYPE variables, they are returning different values. One of the variable is sigma initialised to "\317\203" and the other one is empty string i.e, "" Below is the scenario of the two platforms: In... (4 Replies)
Discussion started by: baig_1988
4 Replies

6. Solaris

setting locale en_US.UTF-8

hi, I am using SOLARIS sparc 64 bit, during installation of Oracle i receive an error required OS locale en_US.UTF-8 does not exist on the installation computer. To avoid this issue, please ensure that the locale en_US.UTF-8 exists on the installation computer prior to installing Oracle. when... (4 Replies)
Discussion started by: zeeshan047
4 Replies

7. Shell Programming and Scripting

Piping fails in locale other than English

Hi, I am new to shell scripting and unix in general, and I am running into a problem. I need to grep my script for a line which is a delimiter for an encoded file. I would like to get the line number of this delimiter so that i can use "tail" to get the encoded data and decode it. I am... (16 Replies)
Discussion started by: adam.wis
16 Replies

8. Debian

Locales UTF8 - not working

Hello, I'm facing a strange problem in one of my Debian server, what is happening right now it that I have runned dpkg-reconfigure locales to set en_US UTF-8 so in that way I could use accentuation in my system. # locale -a C en_US.utf8 POSIX pt_BR.utf8 However, when I create a new... (12 Replies)
Discussion started by: pxb368@motorola
12 Replies

9. AIX

Install EN_GB UTF-8 on AIX 5.3

Hello Gang Can you please help me in installing EN_GB UTF-8 on AIX 5.3 . I have worked on Solaris and Linux, but not familier with AIX so hoping if someone show the roadmap. (5 Replies)
Discussion started by: ningy
5 Replies

10. OS X (Apple)

Sorting scientific numbers with sort

Hey everybody, I'm trying to sort scientific numbers in a descending order using the command sort -gr <file>. It works fine on a Linux-Server, but doesn't on my macbook pro with OS X 10.10.3 (Yosemite). I tried to sort the following: 6.38e-10 6.38e-10 1.80e-11 1.00e-10 1.48e-12 And... (9 Replies)
Discussion started by: plebs
9 Replies

11. Shell Programming and Scripting

How to lowercase the values in a column in awk and include a dynamic counter?

Hi, I am trying to incorporate 2 functions into my `awk` command. I want to lower case Column 2 (which is essentially the same information in Col1, except in Col1 I want to maintain the capitalization) and I want to count from 0-N that begins and ends with the start of certain markers that I... (6 Replies)
Discussion started by: owwow14
6 Replies

12. Shell Programming and Scripting

awk command not working as expected

Following one line of awk code removes first 3 characters from each line but when I run the same code on another linux platform it doesn't work and only prints blank lines for each record. Can anyone please explain why this doesn't work? (31 Replies)
Discussion started by: later_troy
31 Replies

13. UNIX for Beginners Questions & Answers

Join Question

Have two simple sorted text files: file1 dog bark cat meow bird fly goat baa file2 dog loyal cat herd bird scratch bird1 peck goat milkUsing a simple join command is not picking up with word bird. join file1 file2Getting an error indicating that file2 is not sorted although it is. ... (10 Replies)
Discussion started by: jimmyf
10 Replies

14. Shell Programming and Scripting

Bin/bash - xmessage very slow

Hello, I am showing the start of my script. I am finding that 'xmessage' is taking about 12-15 seconds to show. This in a terminal is very quick '/opt/vc/bin/vcgencmd get_camera'. Is there any way to get 'camera not detected' to show faster. Regards #!/bin/bash s=$(/opt/vc/bin/vcgencmd... (4 Replies)
Discussion started by: mad-hatter
4 Replies

15. Solaris

Solaris 11 - Changing systems default locale

Different in Solaris 10 in that you don't just edit TIMEZONE file. LANG is currently set to en_US.UTF-8 and want it to be C. Heres what I did:- # svccfg -s svc:/system/environment:init setprop environment/LANG = astring: C # svcadm refresh svc:/system/environment And afterwards these are... (7 Replies)
Discussion started by: psychocandy
7 Replies