From 84661879883ed020fcd36ee0da962774a56253a0ff32055c5326e5d948e123b6 Mon Sep 17 00:00:00 2001 From: Sascha Peilicke Date: Thu, 31 Mar 2011 12:20:44 +0000 Subject: [PATCH] Accepting request 65643 from devel:languages:perl Accepted submit request 65643 from user coolo OBS-URL: https://build.opensuse.org/request/show/65643 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/perl-Encode-Locale?expand=0&rev=3 --- Encode-Locale-1.01.tar.gz | 3 -- Encode-Locale-1.02.tar.gz | 3 ++ perl-Encode-Locale.changes | 6 +++ perl-Encode-Locale.spec | 91 ++++++++++++++++++++++++++++++++------ 4 files changed, 86 insertions(+), 17 deletions(-) delete mode 100644 Encode-Locale-1.01.tar.gz create mode 100644 Encode-Locale-1.02.tar.gz diff --git a/Encode-Locale-1.01.tar.gz b/Encode-Locale-1.01.tar.gz deleted file mode 100644 index 0de7d81..0000000 --- a/Encode-Locale-1.01.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:111fcdd9012240fa87b49f21573d92b1f826fa968a710346f0053b9c23316ad9 -size 6549 diff --git a/Encode-Locale-1.02.tar.gz b/Encode-Locale-1.02.tar.gz new file mode 100644 index 0000000..ba04443 --- /dev/null +++ b/Encode-Locale-1.02.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:20c5ba2ab0ac00f0e6d5c5d405f2ccb3fdb0212de3519ec8d16688574d8d5340 +size 6753 diff --git a/perl-Encode-Locale.changes b/perl-Encode-Locale.changes index e13d8ef..e479050 100644 --- a/perl-Encode-Locale.changes +++ b/perl-Encode-Locale.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Thu Mar 31 09:36:31 UTC 2011 - coolo@novell.com + +- update to 1.02 + Added supporting hacks for GB18030 and roman8. [RT#66373] [RT#67010] + ------------------------------------------------------------------- Wed Mar 16 22:42:11 UTC 2011 - chris@computersalat.de diff --git a/perl-Encode-Locale.spec b/perl-Encode-Locale.spec index 38caebb..6ae9b9e 100644 --- a/perl-Encode-Locale.spec +++ b/perl-Encode-Locale.spec @@ -1,7 +1,7 @@ # -# spec file for package perl-Encode-Locale +# spec file for package perl-Encode-Locale (Version 1.02) # -# Copyright (c) 2011 SUSE LINUX Products GmbH, Nuernberg, Germany. +# Copyright (c) 2010 SUSE LINUX Products GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -15,27 +15,21 @@ # Please submit bugfixes or comments via http://bugs.opensuse.org/ # - - Name: perl-Encode-Locale -%define cpan_name Encode-Locale -Summary: Determine the locale encoding -Version: 1.01 +Version: 1.02 Release: 1 License: GPL+ or Artistic -Group: Development/Libraries/Perl +%define cpan_name Encode-Locale +Summary: Determine the locale encoding Url: http://search.cpan.org/dist/Encode-Locale/ -Source: http://www.cpan.org/authors/id/G/GA/GAAS/Encode-Locale-%{version}.tar.gz +Group: Development/Libraries/Perl +#Source: http://www.cpan.org/authors/id/G/GA/GAAS/Encode-Locale-%{version}.tar.gz +Source: %{cpan_name}-%{version}.tar.gz BuildArch: noarch BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRequires: perl BuildRequires: perl-macros -BuildRequires: perl(Encode) >= 2 -BuildRequires: perl(Encode::Alias) -Requires: perl(Encode) >= 2 -Requires: perl(Encode::Alias) %{perl_requires} -Recommends: perl(I18N::Langinfo) %description In many applications it's wise to let Perl use Unicode for the strings it @@ -70,6 +64,75 @@ aliased as the same encoding as "locale". The advice is to use "console_in" for input known to come from the terminal and "console_out" for output known to go from the terminal. +In addition to arranging for various Encode aliases the following functions +and variables are provided: + +* decode_argv( ) + +* decode_argv( Encode::FB_CROAK ) + + This will decode the command line arguments to perl (the '@ARGV' array) + in-place. + + The function will by default replace characters that can't be decoded by + "\x{FFFD}", the Unicode replacement character. + + Any argument provided is passed as CHECK to underlying Encode::decode() + call. Pass the value 'Encode::FB_CROAK' to have the decoding croak if not + all the command line arguments can be decoded. See the Encode/"Handling + Malformed Data" manpage for details on other options for CHECK. + +* env( $uni_key ) + +* env( $uni_key => $uni_value ) + + Interface to get/set environment variables. Returns the current value as + a Unicode string. The $uni_key and $uni_value arguments are expected to + be Unicode strings as well. Passing 'undef' as $uni_value deletes the + environment variable named $uni_key. + + The returned value will have the characters that can't be decoded + replaced by "\x{FFFD}", the Unicode replacement character. + + There is no interface to request alternative CHECK behavior as for + decode_argv(). If you need that you need to call encode/decode yourself. + For example: + + my $key = Encode::encode(locale => $uni_key, Encode::FB_CROAK); + my $uni_value = Encode::decode(locale => $ENV{$key}, Encode::FB_CROAK); + +* reinit( ) + +* reinit( $encoding ) + + Reinitialize the encodings from the locale. You want to call this + function if you changed anything in the environment that might influence + the locale. + + This function will croak if the determined encoding isn't recognized by + the Encode module. + + With argument force $ENCODING_... variables to set to the given value. + +* $ENCODING_LOCALE + + The encoding name determined to be suitable for the current locale. the + Encode manpage know this encoding as "locale". + +* $ENCODING_LOCALE_FS + + The encoding name determined to be suiteable for file system interfaces + involving file names. the Encode manpage know this encoding as + "locale_fs". + +* $ENCODING_CONSOLE_IN + +* $ENCODING_CONSOLE_OUT + + The encodings to be used for reading and writing output to the a console. + the Encode manpage know these encodings as "console_in" and + "console_out". + %prep %setup -q -n %{cpan_name}-%{version}