Sponsored Content
Full Discussion: Perl Conversion Tool
Top Forums Shell Programming and Scripting Perl Conversion Tool Post 302381908 by nathan on Monday 21st of December 2009 10:52:10 AM
Old 12-21-2009
I highly recommend you read this article:

The Absolute Minimum Every Software Developer Absolutely, Positively Must Know About Unicode and Character Sets

I was having the same problem a few months back, and this helped clear up some confusion for me.
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Another bash shell to perl conversion

Hello everyone. I am new to linux and need help again. I need help converting this bash shell to linux: for i in `ls -l *.txt` do `./cnvidtf.pl $i` `curl -u login:pswd --disable-espv -T loadfile.seq ftp://11.1.11.1` `mysql -u login -h 11.1.11.1 -ppswd < lddocs.sql` done Thanks! Any help... (6 Replies)
Discussion started by: freak
6 Replies

2. Shell Programming and Scripting

Perl in KSH - julian conversion

Hello Everyone, I have this code misbehaving in one of my scripts, I have a var containing the sequential number of the day for the year and I am suppose to get the regular date for that day and its weekday. If I set the day to 273 I get back 2008/09/31 which is not a proper date. can you help... (7 Replies)
Discussion started by: gio001
7 Replies

3. OS X (Apple)

What's the Best Tool for Perl (for Mac)?

Would it be "PerlApp" or "Active Perl?" Trying to decide on the best tool in order to edit and create a few perl scripts for a mac program I'm working with. Any users out there? (2 Replies)
Discussion started by: unimachead
2 Replies

4. Shell Programming and Scripting

[Perl] Timestamp conversion

Hi, I have searched, read and tried, but no luck. I have this code: #!/bin/perl -w #-d use strict; use POSIX qw(strftime); my $getprpw_list="/usr/lbin/getprpw -l"; my $host = "nbsol151"; my $user = "genadmin"; my %uid; my %spwchg; my %upwchg; my %slogint; (2 Replies)
Discussion started by: ejdv
2 Replies

5. Shell Programming and Scripting

Encoding conversion in PERL script

I have oracle 9i database installed with UTF-8 Encoding. I want a perl script that converts unicode to utf8 before commiting in database and utf8 to unicode when retreiving from database For example : the word Ïntêrnatïônàlîzâtion has to be stored in database as Internationalization and when retreived... (6 Replies)
Discussion started by: vkca
6 Replies

6. Shell Programming and Scripting

perl instead of grep 'conversion' help?

Hello: I butchered a shell script together, but my script kung-fu is 5 years old and all I've used for 5 years are for i loops. I hope that some perl guru can do in 5 minutes what takes me 5 weeks, so I am asking for help. I have a simple script using "grep -A 2 'string' /path/to/file" but... (4 Replies)
Discussion started by: Habitual
4 Replies

7. Shell Programming and Scripting

Timestamp conversion in PERL

Hi, I have a file as below I need to overwrite the 2 nd column alone to numeric format like "06122011030414012345" as per the timestamp value output file should be the microseconds can be neglected if required. Any help will be appreciated. Thanks in advance (1 Reply)
Discussion started by: irudayaraj
1 Replies

8. Shell Programming and Scripting

help me for Perl script for tool usages

Hi, How to do Perl script for floating license usages metric. Anyone help me out this issue? Regards, Ram. (0 Replies)
Discussion started by: ramanthan
0 Replies

9. Shell Programming and Scripting

conversion of loop in perl

Hello Sir, How can i convert below two loop lines in perl for BLOCK in /sys/block/myblock* for BLOCK in /dev/myblock* How i can write them in perl like foreach( </sys/block/myblock*/queue/nr_requests> ) (5 Replies)
Discussion started by: learnbash
5 Replies

10. Shell Programming and Scripting

Perl - TimeDate format conversion

Dear All, I need to print the below value from excel column 20160219T05:21:59+0100 to 19-FEB-2016 05:21:11 Can anyone help on this datetime format conversion. Please suggest in print logic itself. Regards, Kumaresan P (6 Replies)
Discussion started by: Kumaresanpvk
6 Replies
l10n_intro(5)							File Formats Manual						     l10n_intro(5)

NAME
l10n_intro, l10n, locales, LOCPATH - Introduction to localization (L10N) DESCRIPTION
Localization refers to the process of establishing information within a computer system specific to each supported language, cultural data, and coded character set (codeset) combination. Each such combination gives rise to the definition of one locale. The abbreviation L10N is often used to stand for localization as there are 10 characters between the beginning "L" and the ending "N" of that word. See i18n_intro(5) for introductory information about internationalization and how to use system commands to set a locale. For information about creating locales, refer to localedef(1), charmap(4), and locale(4). For information about creating locales and writing applications that use locales, refer to Writing Software for the International Market. The current release of the operating system supports the following languages with locales. Each language is discussed separately in its own reference page: Catalan Chinese (Simplified and Traditional) Czech Dutch Finnish French German Greek Hebrew Hungarian Icelandic Italian Japanese Korean Lithuanian Norwegian Polish Portuguese Russian Slovak Slovene Spanish Swedish Thai Turkish For some of the languages, more than one codeset and country or territory are supported. Hence, multiple locales are supported for certain languages. The following list names and describes all the supported locales. For information about the character encoding used by a par- ticular locale, refer to the reference page for the codeset specified in the last part of the locale name or, for those that end in Uni- code(5). Catalan locale for Spain (uses the Latin-1 codeset) Catalan locale for Spain (uses the Latin-9 codeset) Catalan locale for Spain (uses the UTF-8 codeset) Czech locale for Czech Republic (uses the Latin-2 codeset) Danish locale for Denmark (uses the Latin-1 codeset) Danish locale for Denmark (uses the Latin-9 codeset) Danish locale for Denmark (uses the UTF-8 codeset) German locale for Switzerland (uses the Latin-1 codeset) German locale for Switzerland (uses the Latin-9 codeset) German locale for Switzerland (uses the UTF-8 codeset) German locale for Germany (uses the Latin-1 codeset) German locale for Germany (uses the Latin-9 codeset) German locale for Germany (uses the UTF-8 codeset) Greek locale for Greece (uses the ISO Greek codeset) Greek locale for Greece (uses the UTF-8 codeset) English locale for Great Britain (uses the Latin-1 codeset) English locale for Great Britain (uses the Latin-9 codeset) English locale for Great Britain (uses the UTF-8 codeset) English locale that includes the euro character (uses the UTF-8 codeset) This locale both supports the euro character and defines the decimal point as a comma (,) and the thousands separator as a period (.). Therefore, this locale is useful in many European countries, not just those for which English is the native language, when assigned only to the LC_MONETARY locale category or environment variable. English locale for the U.S. (uses the Latin-1 codeset) English locale for the U.S. (uses the Latin-9 codeset) English locale for the U.S. (uses cp850 encoding) Use this locale with data that contains accented characters and that was generated on a PC using the cp850 code page for character encoding. This character encoding is usually the default for the DOS and Windows operating systems in Europe. The en_US.ISO8859-1 and en_US.cp850 locales encode English characters the same way but use different values for accented and other non-English charac- ters in the Latin-1 character set. English locales for the U.S. (use the UTF-8 codeset) The @euro variant defines the local currency sign to be the euro character and the international currency sign to be EUR. See also en_EU.UTF-8@euro. Spanish locale for Spain (uses the Latin-1 codeset) Spanish locale for Spain (uses the Latin-9 codeset) Spanish locale for Spain (uses the UTF-8 codeset) Finnish locale for Finland (uses the Latin-1 codeset) Finnish locale for Finland (uses the Latin-9 codeset) Finnish locale for Finland (uses the UTF-8 codeset) French locale for Belgium (uses the Latin-1 codeset) French locale for Belgium (uses the Latin-9 codeset) French locale for Belgium (uses the UTF-8 codeset) French locale for Canada (uses the Latin-1 codeset) French locale for Canada (uses the Latin-9 codeset) French locale for Canada (uses the UTF-8 codeset) French locale for Switzerland (uses the Latin-1 codeset) French locale for Switzerland (uses the Latin-9 codeset) French locale for Switzerland (uses the UTF-8 codeset) French locale for France (uses the Latin-1 codeset) French locale for France (uses the Latin-9 codeset) French locale for France (uses the UTF-8 codeset) Hebrew locale for Israel (uses the ISO Hebrew codeset) Hungarian locale for Hun- gary (uses the Latin-2 codeset) Icelandic locale for Iceland (uses the Latin-1 codeset) Icelandic locale for Iceland (uses the Latin-9 codeset) Icelandic locale for Iceland (uses the UTF-8 codeset) Italian locale for Italy (uses the Latin-1 codeset) Italian locale for Italy (uses the Latin-9 codeset) Italian locale for Italy (uses the UTF-8 codeset) Hebrew locale for Israel (uses the ISO Hebrew codeset) This locale name is supported for backward compatibiility. The recommended name to use for the ISO Hebrew locale is he_IL.ISO8859-8. Japanese locale for Japan (uses the Shift JIS codeset) Japanese locale for Japan (uses the DEC Kanji codeset) Japanese locale for Japan (uses the Japanese EUC codeset) Japanese locale for Japan (uses the Super DEC Kanji codeset) Japanese locale for Japan (uses the UTF-8 codeset) Korean locale for Korea (uses the DEC Korean codeset) Korean locale for Korea (uses the Korean EUC codeset) Korean locale for Korea (uses the UTF-8 codeset) Lithuanian locale for Lithuania (uses the Latin-4 codeset) Flemish locale for Bel- gium (uses the Latin-1 codeset) Flemish locale for Belgium (uses the Latin-9 codeset) Flemish locale for Belgium (uses the UTF-8 codeset) Dutch locale for the Netherlands (uses the Latin-1 codeset) Dutch locale for the Netherlands (uses the Latin-9 codeset) Dutch locale for the Netherlands (uses the UTF-8 codeset) Norwegian locale for Norway (uses the Latin-1 codeset) Norwegian locale for Norway (uses the Latin-9 codeset) Norwegian locale for Norway (uses the UTF-8 codeset) Polish locale for Poland (uses the Latin-2 codeset) Portuguese locale for Portugal (uses the Latin-1 codeset) Portuguese locale for Portugal (uses the Latin-9 codeset) Portuguese locale for Portugal (uses the UTF-8 codeset) Russian locale for Russia (uses the ISO Cyrillic codeset) Slovak locale for Slovakia (uses the Latin-2 codeset) Slovene locale for Slovenia (uses the Latin-2 codeset) Swedish locale for Sweden (uses the Latin-1 codeset) Swedish locale for Sweden (uses the Latin-9 codeset) Swedish locale for Sweden (uses the UTF-8 codeset) Thai locale for Thailand (uses the TACTIS codeset) Turkish locale for Turkey (uses the Latin-5 codeset) Simplified Chinese locale for the Peo- ple's Republic of China (uses the DEC Hanzi codeset) Simplified Chinese locale for the People's Republic of China (uses the UTF-8 codeset) Traditional Chinese locale for Hong Kong (uses the BIG-5 codeset) Traditional Chinese locale for Hong Kong (uses the DEC Hanyu codeset) Simplified Chinese locale for Hong Kong (uses the DEC Hanzi codeset Traditional Chinese locale for Hong Kong (uses the Taiwanese EUC codeset) Traditional Chinese locale for Hong Kong (uses the UTF-8 codeset) Traditional Chinese locale for Taiwan (uses the BIG-5 codeset) Traditional Chinese locale for Taiwan (uses the DEC Hanyu codeset) Traditional Chinese locale for Taiwan (uses the Taiwanese EUC codeset) Traditional Chinese locale for Taiwan (uses the UTF-8 codeset) This locale supports Simplified Chinese as well as Traditional Chinese. For the zh_CN.dechanzi locale, the @pinyin, @radical, and @stroke variants are available for sorting by pinyin, radical, and stroke, respectively. For the zh_TW.big5, zh_TW.dechanyu, and zh_TW.eucTW locales, the @chuyin, @radical, and @stroke variants are available for sorting by chuyin, radical, and stroke, respectively. These variant locale names (those including the @collation_modifier suffix) are available for assignment to the LC_COLLATE variable. The locales whose names end in support file code and internal process code according to the ISO 10646 and Unicode standards. The univer- sal.UTF-8 locale is also available (for use by applications rather than end users) and supports the complete set of characters in the Uni- versal Character Set (UCS). For locales, file code may include characters encoded in more than one byte, so these locales should not be used by applications that do not use wide-character functions for data manipulation. For some locales that use traditional UNIX and proprietary codesets, there are also corresponding @ucs4 locale variants available for use by applications that require internal process code to be in UCS-4 format while file code remains in the format of the traditional UNIX or proprietary codeset. In other words, both UTF-8 and @ucs4 locales use UCS-4 format for internal process code, but differ in terms of file code support. Refer to Unicode(5) for more information about encoding formats of the @ucs4 and locales. The and locales are the only locales that include the euro (C=) monetary sign in the coded character set. The *.UTF-8@euro locales also define the local currency sign to be the euro character and the international currency sign to be EUR. See euro(5) for more information about the euro character and how it is supported. You can use the -a option with the locale command to list all the locales available on the system. Note that the POSIX (or C) locale is always available because it must exist on all systems that conform to The Open Group's UNIX specifications. The POSIX locale is the default locale when locale variables are not set. Note The dxterm terminal emulator does not support locales based on the following codesets: Unicode (UTF-8) Latin-9 (ISO8859-15) Use dtterm, the default terminal emulator for the Common Desktop Environment (CDE), with locales based on the Latin-9 and UTF-8 codesets. Environment Variables Related to Localization The following system environment variables can be set (usually only by installed applications or by programmers who are testing applica- tions or converters under development) to override the default search path for certain kinds of localized files: Specifies the search path for locales and codeset converters. Note that this environment variable is not defined by current industry standards. For more informa- tion, refer to the iconv_intro(5), iconv_open(3), and setlocale(3) reference pages. Because the LOCPATH variable is not defined by standards, it is recommended for use only when testing locales or converters under development and not as a systemwide method for finding installed converters or locales. When you set LOCPATH, make sure that the search path is valid for both locales and converters. Otherwise, application and system software will be able to find only locales or only converters in environments where both kinds of files are required. Specifies the search path for message catalogs, which contain translated text for programs. This variable is used primarily by the catopen() function. Refer to the catopen(3) reference page for detailed information on NLSPATH. Customizing Locales Partial source files, along with an associated Makefile, are available for many locales in the /usr/lib/nls/loc/src directory. By editing one of these source files and using the Makefile to rebuild the locale (make locale_name), you can customize one or more of the following features: The format of affirmative and negative responses (LC_MESSAGES section) Rules and symbols for formatting monetary numeric informa- tion (LC_MONETARY section) Rules and symbols for formatting nonmonetary numeric information (LC_NUMERIC section) Rules and symbols for for- matting date and time information (LC_TIME section) The LC_CTYPE and LC_COLLATE sections of these locale sources are not customizable. This means that you cannot use one of these sources to change how characters are classified or collated. By implication, this also means that you cannot add a new character to a locale that does not already support it. For example, you cannot add the European monetary character (euro) to a locale that does not already support that character. However, you can edit the LC_MONETARY section to define a string identifier for euro by using characters that the locale does support. For example, you could replace the existing monetary symbol with EUR. For more information on a locale source file, see locale(4). Caution Customized versions of locales that are provided with the operating system are not preserved when the operating system is reinstalled, even when an update installation procedure is used. Therefore, it is important to back up files for customized locales and their sources before reinstalling the operating system. After the reinstallation is complete, you will need to restore your customized locales to the system. If the newly installed sources have revisions when compared to the the old sources, it might be preferable to apply your customizations to the newly installed sources and rebuild your customized locales. SEE ALSO
Commands: locale(1), localedef(1) Functions: catopen(3) Files: charmap(4), locale(4) Others: Catalan(5), Chinese(5), Czech(5), dechanyu(5), dechanzi(5), deckanji(5), deckorean(5), Dutch(5), eucJP(5), eucKR(5), eucTW(5), euro(5), Finnish(5), French(5), German(5), Greek(5), Hebrew(5), Hungarian(5), i18n_intro(5), i18n_printing(5), Icelandic(5), iconv_intro(5), iso2022(5), iso2022jp(5), iso8859-1(5), iso8859-2(5), iso8859-4(5), iso8859-5(5), iso8859-7(5), iso8859-8(5), iso8859-9(5), iso8859-15(5), Italian(5), Japanese(5), jiskanji(5), Korean(5), Lithuanian(5), Norwegian(5), Polish(5), Portuguese(5), Russian(5), sbig5(5), sdeckanji(5), shiftjis(5), Slovak(5), Slovene(5), Spanish(5), Swedish(5), TACTIS(5), telecode(5) Thai(5), Turkish(5), Unicode(5) Writing Software for the International Market l10n_intro(5)
All times are GMT -4. The time now is 06:15 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy