File perl-Encode-Buckwalter.spec of Package perl-Encode-Buckwalter
#
# spec file for package perl-Encode-Buckwalter
#
# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
Name: perl-Encode-Buckwalter
Version: 1.1
Release: 0
%define cpan_name Encode-Buckwalter
Summary: ASCII-based Transliteration for Arabic
License: GPL-1.0+ or Artistic-1.0
Group: Development/Libraries/Perl
Url: http://search.cpan.org/dist/Encode-Buckwalter/
Source0: http://www.cpan.org/authors/id/G/GR/GRAFF/%{cpan_name}-%{version}.tar.gz
BuildArch: noarch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildRequires: perl
BuildRequires: perl-macros
%{perl_requires}
%description
(Most of the following is adapted from comments in the Buckwalter.ucm file,
which is included in the Encode directory in this distribution.)
In the Buckwalter transliteration for Arabic, standard ASCII alphabetics,
brackets and punctuation are used to represent Arabic characters. This
entails that any text string "encoded" in Buckwalter cannot contain, e.g.
English words or abbreviations.
As a result, when Arabic Unicode text is encoded into Buckwalter, any Latin
alphabetic characters mixed in with the Arabic cannot be preserved -- they
will be converted to a default "replacement character" (the ASCII question
mark), causing a loss of information. ASCII digits, and punctuation and
brackets that are not used to represent Arabic characters in Buckwalter,
will be passed through without change.
For digits and shared punctuation, conversion is uni-directional: in
Unicode->Buckwalter, the Arabic comma, semicolon, question mark and
Arabic-Indic digits (U+060C, U+061B, U+061F, U+0660 - U+0669) will always
be converted to their ASCII equivalents (U+002C, U+003B, U+003F, U+0030 -
U+0039,), but in Buckwalter->Unicode, these ASCII characters are never
converted to the Arabic-table versions.
Note that the ASCII characters used for one-to-one mapping to Arabic
characters include the following "volatile" code points, which will
generally need to be quoted or escaped (if used in shell commands) or
re-transliterated as "character entity references" (if used in html, xml,
sgml or a url):
& (&)
< (<)
> (>)
' (' or &x#27)
$ ($ or &x#24)
* (* or &x#2a)
` (` or &x#60)
{ ({ or &x#7b)
| (| or &x#7c)
} (} or &x#7d)
%prep
%setup -q -n %{cpan_name}-%{version}
%build
%{__perl} Makefile.PL INSTALLDIRS=vendor
%{__make} %{?_smp_mflags}
%check
%{__make} test
%install
%perl_make_install
%perl_process_packlist
%perl_gen_filelist
%files -f %{name}.files
%defattr(-,root,root,755)
%doc Changes Encode README
%changelog