You've already forked joomla_test
first commit
This commit is contained in:
502
libraries/simplepie/idn/LICENCE
Normal file
502
libraries/simplepie/idn/LICENCE
Normal file
@ -0,0 +1,502 @@
|
||||
GNU LESSER GENERAL PUBLIC LICENSE
|
||||
Version 2.1, February 1999
|
||||
|
||||
Copyright (C) 1991, 1999 Free Software Foundation, Inc.
|
||||
59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
[This is the first released version of the Lesser GPL. It also counts
|
||||
as the successor of the GNU Library Public License, version 2, hence
|
||||
the version number 2.1.]
|
||||
|
||||
Preamble
|
||||
|
||||
The licenses for most software are designed to take away your
|
||||
freedom to share and change it. By contrast, the GNU General Public
|
||||
Licenses are intended to guarantee your freedom to share and change
|
||||
free software--to make sure the software is free for all its users.
|
||||
|
||||
This license, the Lesser General Public License, applies to some
|
||||
specially designated software packages--typically libraries--of the
|
||||
Free Software Foundation and other authors who decide to use it. You
|
||||
can use it too, but we suggest you first think carefully about whether
|
||||
this license or the ordinary General Public License is the better
|
||||
strategy to use in any particular case, based on the explanations below.
|
||||
|
||||
When we speak of free software, we are referring to freedom of use,
|
||||
not price. Our General Public Licenses are designed to make sure that
|
||||
you have the freedom to distribute copies of free software (and charge
|
||||
for this service if you wish); that you receive source code or can get
|
||||
it if you want it; that you can change the software and use pieces of
|
||||
it in new free programs; and that you are informed that you can do
|
||||
these things.
|
||||
|
||||
To protect your rights, we need to make restrictions that forbid
|
||||
distributors to deny you these rights or to ask you to surrender these
|
||||
rights. These restrictions translate to certain responsibilities for
|
||||
you if you distribute copies of the library or if you modify it.
|
||||
|
||||
For example, if you distribute copies of the library, whether gratis
|
||||
or for a fee, you must give the recipients all the rights that we gave
|
||||
you. You must make sure that they, too, receive or can get the source
|
||||
code. If you link other code with the library, you must provide
|
||||
complete object files to the recipients, so that they can relink them
|
||||
with the library after making changes to the library and recompiling
|
||||
it. And you must show them these terms so they know their rights.
|
||||
|
||||
We protect your rights with a two-step method: (1) we copyright the
|
||||
library, and (2) we offer you this license, which gives you legal
|
||||
permission to copy, distribute and/or modify the library.
|
||||
|
||||
To protect each distributor, we want to make it very clear that
|
||||
there is no warranty for the free library. Also, if the library is
|
||||
modified by someone else and passed on, the recipients should know
|
||||
that what they have is not the original version, so that the original
|
||||
author's reputation will not be affected by problems that might be
|
||||
introduced by others.
|
||||
|
||||
Finally, software patents pose a constant threat to the existence of
|
||||
any free program. We wish to make sure that a company cannot
|
||||
effectively restrict the users of a free program by obtaining a
|
||||
restrictive license from a patent holder. Therefore, we insist that
|
||||
any patent license obtained for a version of the library must be
|
||||
consistent with the full freedom of use specified in this license.
|
||||
|
||||
Most GNU software, including some libraries, is covered by the
|
||||
ordinary GNU General Public License. This license, the GNU Lesser
|
||||
General Public License, applies to certain designated libraries, and
|
||||
is quite different from the ordinary General Public License. We use
|
||||
this license for certain libraries in order to permit linking those
|
||||
libraries into non-free programs.
|
||||
|
||||
When a program is linked with a library, whether statically or using
|
||||
a shared library, the combination of the two is legally speaking a
|
||||
combined work, a derivative of the original library. The ordinary
|
||||
General Public License therefore permits such linking only if the
|
||||
entire combination fits its criteria of freedom. The Lesser General
|
||||
Public License permits more lax criteria for linking other code with
|
||||
the library.
|
||||
|
||||
We call this license the "Lesser" General Public License because it
|
||||
does Less to protect the user's freedom than the ordinary General
|
||||
Public License. It also provides other free software developers Less
|
||||
of an advantage over competing non-free programs. These disadvantages
|
||||
are the reason we use the ordinary General Public License for many
|
||||
libraries. However, the Lesser license provides advantages in certain
|
||||
special circumstances.
|
||||
|
||||
For example, on rare occasions, there may be a special need to
|
||||
encourage the widest possible use of a certain library, so that it becomes
|
||||
a de-facto standard. To achieve this, non-free programs must be
|
||||
allowed to use the library. A more frequent case is that a free
|
||||
library does the same job as widely used non-free libraries. In this
|
||||
case, there is little to gain by limiting the free library to free
|
||||
software only, so we use the Lesser General Public License.
|
||||
|
||||
In other cases, permission to use a particular library in non-free
|
||||
programs enables a greater number of people to use a large body of
|
||||
free software. For example, permission to use the GNU C Library in
|
||||
non-free programs enables many more people to use the whole GNU
|
||||
operating system, as well as its variant, the GNU/Linux operating
|
||||
system.
|
||||
|
||||
Although the Lesser General Public License is Less protective of the
|
||||
users' freedom, it does ensure that the user of a program that is
|
||||
linked with the Library has the freedom and the wherewithal to run
|
||||
that program using a modified version of the Library.
|
||||
|
||||
The precise terms and conditions for copying, distribution and
|
||||
modification follow. Pay close attention to the difference between a
|
||||
"work based on the library" and a "work that uses the library". The
|
||||
former contains code derived from the library, whereas the latter must
|
||||
be combined with the library in order to run.
|
||||
|
||||
GNU LESSER GENERAL PUBLIC LICENSE
|
||||
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
||||
|
||||
0. This License Agreement applies to any software library or other
|
||||
program which contains a notice placed by the copyright holder or
|
||||
other authorized party saying it may be distributed under the terms of
|
||||
this Lesser General Public License (also called "this License").
|
||||
Each licensee is addressed as "you".
|
||||
|
||||
A "library" means a collection of software functions and/or data
|
||||
prepared so as to be conveniently linked with application programs
|
||||
(which use some of those functions and data) to form executables.
|
||||
|
||||
The "Library", below, refers to any such software library or work
|
||||
which has been distributed under these terms. A "work based on the
|
||||
Library" means either the Library or any derivative work under
|
||||
copyright law: that is to say, a work containing the Library or a
|
||||
portion of it, either verbatim or with modifications and/or translated
|
||||
straightforwardly into another language. (Hereinafter, translation is
|
||||
included without limitation in the term "modification".)
|
||||
|
||||
"Source code" for a work means the preferred form of the work for
|
||||
making modifications to it. For a library, complete source code means
|
||||
all the source code for all modules it contains, plus any associated
|
||||
interface definition files, plus the scripts used to control compilation
|
||||
and installation of the library.
|
||||
|
||||
Activities other than copying, distribution and modification are not
|
||||
covered by this License; they are outside its scope. The act of
|
||||
running a program using the Library is not restricted, and output from
|
||||
such a program is covered only if its contents constitute a work based
|
||||
on the Library (independent of the use of the Library in a tool for
|
||||
writing it). Whether that is true depends on what the Library does
|
||||
and what the program that uses the Library does.
|
||||
|
||||
1. You may copy and distribute verbatim copies of the Library's
|
||||
complete source code as you receive it, in any medium, provided that
|
||||
you conspicuously and appropriately publish on each copy an
|
||||
appropriate copyright notice and disclaimer of warranty; keep intact
|
||||
all the notices that refer to this License and to the absence of any
|
||||
warranty; and distribute a copy of this License along with the
|
||||
Library.
|
||||
|
||||
You may charge a fee for the physical act of transferring a copy,
|
||||
and you may at your option offer warranty protection in exchange for a
|
||||
fee.
|
||||
|
||||
2. You may modify your copy or copies of the Library or any portion
|
||||
of it, thus forming a work based on the Library, and copy and
|
||||
distribute such modifications or work under the terms of Section 1
|
||||
above, provided that you also meet all of these conditions:
|
||||
|
||||
a) The modified work must itself be a software library.
|
||||
|
||||
b) You must cause the files modified to carry prominent notices
|
||||
stating that you changed the files and the date of any change.
|
||||
|
||||
c) You must cause the whole of the work to be licensed at no
|
||||
charge to all third parties under the terms of this License.
|
||||
|
||||
d) If a facility in the modified Library refers to a function or a
|
||||
table of data to be supplied by an application program that uses
|
||||
the facility, other than as an argument passed when the facility
|
||||
is invoked, then you must make a good faith effort to ensure that,
|
||||
in the event an application does not supply such function or
|
||||
table, the facility still operates, and performs whatever part of
|
||||
its purpose remains meaningful.
|
||||
|
||||
(For example, a function in a library to compute square roots has
|
||||
a purpose that is entirely well-defined independent of the
|
||||
application. Therefore, Subsection 2d requires that any
|
||||
application-supplied function or table used by this function must
|
||||
be optional: if the application does not supply it, the square
|
||||
root function must still compute square roots.)
|
||||
|
||||
These requirements apply to the modified work as a whole. If
|
||||
identifiable sections of that work are not derived from the Library,
|
||||
and can be reasonably considered independent and separate works in
|
||||
themselves, then this License, and its terms, do not apply to those
|
||||
sections when you distribute them as separate works. But when you
|
||||
distribute the same sections as part of a whole which is a work based
|
||||
on the Library, the distribution of the whole must be on the terms of
|
||||
this License, whose permissions for other licensees extend to the
|
||||
entire whole, and thus to each and every part regardless of who wrote
|
||||
it.
|
||||
|
||||
Thus, it is not the intent of this section to claim rights or contest
|
||||
your rights to work written entirely by you; rather, the intent is to
|
||||
exercise the right to control the distribution of derivative or
|
||||
collective works based on the Library.
|
||||
|
||||
In addition, mere aggregation of another work not based on the Library
|
||||
with the Library (or with a work based on the Library) on a volume of
|
||||
a storage or distribution medium does not bring the other work under
|
||||
the scope of this License.
|
||||
|
||||
3. You may opt to apply the terms of the ordinary GNU General Public
|
||||
License instead of this License to a given copy of the Library. To do
|
||||
this, you must alter all the notices that refer to this License, so
|
||||
that they refer to the ordinary GNU General Public License, version 2,
|
||||
instead of to this License. (If a newer version than version 2 of the
|
||||
ordinary GNU General Public License has appeared, then you can specify
|
||||
that version instead if you wish.) Do not make any other change in
|
||||
these notices.
|
||||
|
||||
Once this change is made in a given copy, it is irreversible for
|
||||
that copy, so the ordinary GNU General Public License applies to all
|
||||
subsequent copies and derivative works made from that copy.
|
||||
|
||||
This option is useful when you wish to copy part of the code of
|
||||
the Library into a program that is not a library.
|
||||
|
||||
4. You may copy and distribute the Library (or a portion or
|
||||
derivative of it, under Section 2) in object code or executable form
|
||||
under the terms of Sections 1 and 2 above provided that you accompany
|
||||
it with the complete corresponding machine-readable source code, which
|
||||
must be distributed under the terms of Sections 1 and 2 above on a
|
||||
medium customarily used for software interchange.
|
||||
|
||||
If distribution of object code is made by offering access to copy
|
||||
from a designated place, then offering equivalent access to copy the
|
||||
source code from the same place satisfies the requirement to
|
||||
distribute the source code, even though third parties are not
|
||||
compelled to copy the source along with the object code.
|
||||
|
||||
5. A program that contains no derivative of any portion of the
|
||||
Library, but is designed to work with the Library by being compiled or
|
||||
linked with it, is called a "work that uses the Library". Such a
|
||||
work, in isolation, is not a derivative work of the Library, and
|
||||
therefore falls outside the scope of this License.
|
||||
|
||||
However, linking a "work that uses the Library" with the Library
|
||||
creates an executable that is a derivative of the Library (because it
|
||||
contains portions of the Library), rather than a "work that uses the
|
||||
library". The executable is therefore covered by this License.
|
||||
Section 6 states terms for distribution of such executables.
|
||||
|
||||
When a "work that uses the Library" uses material from a header file
|
||||
that is part of the Library, the object code for the work may be a
|
||||
derivative work of the Library even though the source code is not.
|
||||
Whether this is true is especially significant if the work can be
|
||||
linked without the Library, or if the work is itself a library. The
|
||||
threshold for this to be true is not precisely defined by law.
|
||||
|
||||
If such an object file uses only numerical parameters, data
|
||||
structure layouts and accessors, and small macros and small inline
|
||||
functions (ten lines or less in length), then the use of the object
|
||||
file is unrestricted, regardless of whether it is legally a derivative
|
||||
work. (Executables containing this object code plus portions of the
|
||||
Library will still fall under Section 6.)
|
||||
|
||||
Otherwise, if the work is a derivative of the Library, you may
|
||||
distribute the object code for the work under the terms of Section 6.
|
||||
Any executables containing that work also fall under Section 6,
|
||||
whether or not they are linked directly with the Library itself.
|
||||
|
||||
6. As an exception to the Sections above, you may also combine or
|
||||
link a "work that uses the Library" with the Library to produce a
|
||||
work containing portions of the Library, and distribute that work
|
||||
under terms of your choice, provided that the terms permit
|
||||
modification of the work for the customer's own use and reverse
|
||||
engineering for debugging such modifications.
|
||||
|
||||
You must give prominent notice with each copy of the work that the
|
||||
Library is used in it and that the Library and its use are covered by
|
||||
this License. You must supply a copy of this License. If the work
|
||||
during execution displays copyright notices, you must include the
|
||||
copyright notice for the Library among them, as well as a reference
|
||||
directing the user to the copy of this License. Also, you must do one
|
||||
of these things:
|
||||
|
||||
a) Accompany the work with the complete corresponding
|
||||
machine-readable source code for the Library including whatever
|
||||
changes were used in the work (which must be distributed under
|
||||
Sections 1 and 2 above); and, if the work is an executable linked
|
||||
with the Library, with the complete machine-readable "work that
|
||||
uses the Library", as object code and/or source code, so that the
|
||||
user can modify the Library and then relink to produce a modified
|
||||
executable containing the modified Library. (It is understood
|
||||
that the user who changes the contents of definitions files in the
|
||||
Library will not necessarily be able to recompile the application
|
||||
to use the modified definitions.)
|
||||
|
||||
b) Use a suitable shared library mechanism for linking with the
|
||||
Library. A suitable mechanism is one that (1) uses at run time a
|
||||
copy of the library already present on the user's computer system,
|
||||
rather than copying library functions into the executable, and (2)
|
||||
will operate properly with a modified version of the library, if
|
||||
the user installs one, as long as the modified version is
|
||||
interface-compatible with the version that the work was made with.
|
||||
|
||||
c) Accompany the work with a written offer, valid for at
|
||||
least three years, to give the same user the materials
|
||||
specified in Subsection 6a, above, for a charge no more
|
||||
than the cost of performing this distribution.
|
||||
|
||||
d) If distribution of the work is made by offering access to copy
|
||||
from a designated place, offer equivalent access to copy the above
|
||||
specified materials from the same place.
|
||||
|
||||
e) Verify that the user has already received a copy of these
|
||||
materials or that you have already sent this user a copy.
|
||||
|
||||
For an executable, the required form of the "work that uses the
|
||||
Library" must include any data and utility programs needed for
|
||||
reproducing the executable from it. However, as a special exception,
|
||||
the materials to be distributed need not include anything that is
|
||||
normally distributed (in either source or binary form) with the major
|
||||
components (compiler, kernel, and so on) of the operating system on
|
||||
which the executable runs, unless that component itself accompanies
|
||||
the executable.
|
||||
|
||||
It may happen that this requirement contradicts the license
|
||||
restrictions of other proprietary libraries that do not normally
|
||||
accompany the operating system. Such a contradiction means you cannot
|
||||
use both them and the Library together in an executable that you
|
||||
distribute.
|
||||
|
||||
7. You may place library facilities that are a work based on the
|
||||
Library side-by-side in a single library together with other library
|
||||
facilities not covered by this License, and distribute such a combined
|
||||
library, provided that the separate distribution of the work based on
|
||||
the Library and of the other library facilities is otherwise
|
||||
permitted, and provided that you do these two things:
|
||||
|
||||
a) Accompany the combined library with a copy of the same work
|
||||
based on the Library, uncombined with any other library
|
||||
facilities. This must be distributed under the terms of the
|
||||
Sections above.
|
||||
|
||||
b) Give prominent notice with the combined library of the fact
|
||||
that part of it is a work based on the Library, and explaining
|
||||
where to find the accompanying uncombined form of the same work.
|
||||
|
||||
8. You may not copy, modify, sublicense, link with, or distribute
|
||||
the Library except as expressly provided under this License. Any
|
||||
attempt otherwise to copy, modify, sublicense, link with, or
|
||||
distribute the Library is void, and will automatically terminate your
|
||||
rights under this License. However, parties who have received copies,
|
||||
or rights, from you under this License will not have their licenses
|
||||
terminated so long as such parties remain in full compliance.
|
||||
|
||||
9. You are not required to accept this License, since you have not
|
||||
signed it. However, nothing else grants you permission to modify or
|
||||
distribute the Library or its derivative works. These actions are
|
||||
prohibited by law if you do not accept this License. Therefore, by
|
||||
modifying or distributing the Library (or any work based on the
|
||||
Library), you indicate your acceptance of this License to do so, and
|
||||
all its terms and conditions for copying, distributing or modifying
|
||||
the Library or works based on it.
|
||||
|
||||
10. Each time you redistribute the Library (or any work based on the
|
||||
Library), the recipient automatically receives a license from the
|
||||
original licensor to copy, distribute, link with or modify the Library
|
||||
subject to these terms and conditions. You may not impose any further
|
||||
restrictions on the recipients' exercise of the rights granted herein.
|
||||
You are not responsible for enforcing compliance by third parties with
|
||||
this License.
|
||||
|
||||
11. If, as a consequence of a court judgment or allegation of patent
|
||||
infringement or for any other reason (not limited to patent issues),
|
||||
conditions are imposed on you (whether by court order, agreement or
|
||||
otherwise) that contradict the conditions of this License, they do not
|
||||
excuse you from the conditions of this License. If you cannot
|
||||
distribute so as to satisfy simultaneously your obligations under this
|
||||
License and any other pertinent obligations, then as a consequence you
|
||||
may not distribute the Library at all. For example, if a patent
|
||||
license would not permit royalty-free redistribution of the Library by
|
||||
all those who receive copies directly or indirectly through you, then
|
||||
the only way you could satisfy both it and this License would be to
|
||||
refrain entirely from distribution of the Library.
|
||||
|
||||
If any portion of this section is held invalid or unenforceable under any
|
||||
particular circumstance, the balance of the section is intended to apply,
|
||||
and the section as a whole is intended to apply in other circumstances.
|
||||
|
||||
It is not the purpose of this section to induce you to infringe any
|
||||
patents or other property right claims or to contest validity of any
|
||||
such claims; this section has the sole purpose of protecting the
|
||||
integrity of the free software distribution system which is
|
||||
implemented by public license practices. Many people have made
|
||||
generous contributions to the wide range of software distributed
|
||||
through that system in reliance on consistent application of that
|
||||
system; it is up to the author/donor to decide if he or she is willing
|
||||
to distribute software through any other system and a licensee cannot
|
||||
impose that choice.
|
||||
|
||||
This section is intended to make thoroughly clear what is believed to
|
||||
be a consequence of the rest of this License.
|
||||
|
||||
12. If the distribution and/or use of the Library is restricted in
|
||||
certain countries either by patents or by copyrighted interfaces, the
|
||||
original copyright holder who places the Library under this License may add
|
||||
an explicit geographical distribution limitation excluding those countries,
|
||||
so that distribution is permitted only in or among countries not thus
|
||||
excluded. In such case, this License incorporates the limitation as if
|
||||
written in the body of this License.
|
||||
|
||||
13. The Free Software Foundation may publish revised and/or new
|
||||
versions of the Lesser General Public License from time to time.
|
||||
Such new versions will be similar in spirit to the present version,
|
||||
but may differ in detail to address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the Library
|
||||
specifies a version number of this License which applies to it and
|
||||
"any later version", you have the option of following the terms and
|
||||
conditions either of that version or of any later version published by
|
||||
the Free Software Foundation. If the Library does not specify a
|
||||
license version number, you may choose any version ever published by
|
||||
the Free Software Foundation.
|
||||
|
||||
14. If you wish to incorporate parts of the Library into other free
|
||||
programs whose distribution conditions are incompatible with these,
|
||||
write to the author to ask for permission. For software which is
|
||||
copyrighted by the Free Software Foundation, write to the Free
|
||||
Software Foundation; we sometimes make exceptions for this. Our
|
||||
decision will be guided by the two goals of preserving the free status
|
||||
of all derivatives of our free software and of promoting the sharing
|
||||
and reuse of software generally.
|
||||
|
||||
NO WARRANTY
|
||||
|
||||
15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
|
||||
WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
|
||||
EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
|
||||
OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
|
||||
KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
|
||||
LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
|
||||
THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
|
||||
|
||||
16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
|
||||
WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
|
||||
AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
|
||||
FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
|
||||
CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
|
||||
LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
|
||||
RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
|
||||
FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
|
||||
SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
|
||||
DAMAGES.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
How to Apply These Terms to Your New Libraries
|
||||
|
||||
If you develop a new library, and you want it to be of the greatest
|
||||
possible use to the public, we recommend making it free software that
|
||||
everyone can redistribute and change. You can do so by permitting
|
||||
redistribution under these terms (or, alternatively, under the terms of the
|
||||
ordinary General Public License).
|
||||
|
||||
To apply these terms, attach the following notices to the library. It is
|
||||
safest to attach them to the start of each source file to most effectively
|
||||
convey the exclusion of warranty; and each file should have at least the
|
||||
"copyright" line and a pointer to where the full notice is found.
|
||||
|
||||
<one line to give the library's name and a brief idea of what it does.>
|
||||
Copyright (C) <year> <name of author>
|
||||
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2.1 of the License, or (at your option) any later version.
|
||||
|
||||
This library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public
|
||||
License along with this library; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
|
||||
Also add information on how to contact you by electronic and paper mail.
|
||||
|
||||
You should also get your employer (if you work as a programmer) or your
|
||||
school, if any, to sign a "copyright disclaimer" for the library, if
|
||||
necessary. Here is a sample; alter the names:
|
||||
|
||||
Yoyodyne, Inc., hereby disclaims all copyright interest in the
|
||||
library `Frob' (a library for tweaking knobs) written by James Random Hacker.
|
||||
|
||||
<signature of Ty Coon>, 1 April 1990
|
||||
Ty Coon, President of Vice
|
||||
|
||||
That's all there is to it!
|
123
libraries/simplepie/idn/ReadMe.txt
Normal file
123
libraries/simplepie/idn/ReadMe.txt
Normal file
@ -0,0 +1,123 @@
|
||||
*******************************************************************************
|
||||
* *
|
||||
* IDNA Convert (idna_convert.class.php) *
|
||||
* *
|
||||
* http://idnaconv.phlymail.de mailto:phlymail@phlylabs.de *
|
||||
*******************************************************************************
|
||||
* (c) 2004-2007 phlyLabs, Berlin *
|
||||
* This file is encoded in UTF-8 *
|
||||
*******************************************************************************
|
||||
|
||||
Introduction
|
||||
------------
|
||||
|
||||
The class idna_convert allows to convert internationalized domain names
|
||||
(see RFC 3490, 3491, 3492 and 3454 for detials) as they can be used with various
|
||||
registries worldwide to be translated between their original (localized) form
|
||||
and their encoded form as it will be used in the DNS (Domain Name System).
|
||||
|
||||
The class provides two public methods, encode() and decode(), which do exactly
|
||||
what you would expect them to do. You are allowed to use complete domain names,
|
||||
simple strings and complete email addresses as well. That means, that you might
|
||||
use any of the following notations:
|
||||
|
||||
- www.nörgler.com
|
||||
- xn--nrgler-wxa
|
||||
- xn--brse-5qa.xn--knrz-1ra.info
|
||||
|
||||
Errors, incorrectly encoded or invalid strings will lead to either a FALSE
|
||||
response (when in strict mode) or to only partially converted strings.
|
||||
You can query the occured error by calling the method get_last_error().
|
||||
|
||||
Unicode strings are expected to be either UTF-8 strings, UCS-4 strings or UCS-4
|
||||
arrays. The default format is UTF-8. For setting different encodings, you can
|
||||
call the method setParams() - please see the inline documentation for details.
|
||||
ACE strings (the Punycode form) are always 7bit ASCII strings.
|
||||
|
||||
ATTENTION: We no longer supply the PHP5 version of the class. It is not
|
||||
necessary for achieving a successfull conversion, since the supplied PHP code is
|
||||
compatible with both PHP4 and PHP5. We expect to see no compatibility issues
|
||||
with the upcoming PHP6, too.
|
||||
|
||||
|
||||
Files
|
||||
-----
|
||||
|
||||
idna_convert.class.php - The actual class
|
||||
idna_convert.create.npdata.php - Useful for (re)creating the NPData file
|
||||
npdata.ser - Serialized data for NamePrep
|
||||
example.php - An example web page for converting
|
||||
ReadMe.txt - This file
|
||||
LICENCE - The LGPL licence file
|
||||
|
||||
The class is contained in idna_convert.class.php.
|
||||
MAKE SURE to copy the npdata.ser file into the same folder as the class file
|
||||
itself!
|
||||
|
||||
|
||||
Examples
|
||||
--------
|
||||
|
||||
1. Say we wish to encode the domain name nörgler.com:
|
||||
|
||||
// Include the class
|
||||
include_once('idna_convert.class.php');
|
||||
// Instantiate it *
|
||||
$IDN = new idna_convert();
|
||||
// The input string, if input is not UTF-8 or UCS-4, it must be converted before
|
||||
$input = utf8_encode('nörgler.com');
|
||||
// Encode it to its punycode presentation
|
||||
$output = $IDN->encode($input);
|
||||
// Output, what we got now
|
||||
echo $output; // This will read: xn--nrgler-wxa.com
|
||||
|
||||
|
||||
2. We received an email from a punycoded domain and are willing to learn, how
|
||||
the domain name reads originally
|
||||
|
||||
// Include the class
|
||||
include_once('idna_convert.class.php');
|
||||
// Instantiate it (depending on the version you are using) with
|
||||
$IDN = new idna_convert();
|
||||
// The input string
|
||||
$input = 'andre@xn--brse-5qa.xn--knrz-1ra.info';
|
||||
// Encode it to its punycode presentation
|
||||
$output = $IDN->decode($input);
|
||||
// Output, what we got now, if output should be in a format different to UTF-8
|
||||
// or UCS-4, you will have to convert it before outputting it
|
||||
echo utf8_decode($output); // This will read: andre@börse.knörz.info
|
||||
|
||||
|
||||
3. The input is read from a UCS-4 coded file and encoded line by line. By
|
||||
appending the optional second parameter we tell enode() about the input
|
||||
format to be used
|
||||
|
||||
// Include the class
|
||||
include_once('idna_convert.class.php');
|
||||
// Instantiate it
|
||||
$IDN = new dinca_convert();
|
||||
// Iterate through the input file line by line
|
||||
foreach (file('ucs4-domains.txt') as $line) {
|
||||
echo $IDN->encode(trim($line), 'ucs4_string');
|
||||
echo "\n";
|
||||
}
|
||||
|
||||
|
||||
NPData
|
||||
------
|
||||
|
||||
Should you need to recreate the npdata.ser file, which holds all necessary translation
|
||||
tables in a serialized format, you can run the file idna_convert.create.npdata.php, which
|
||||
creates the file for you and stores it in the same folder, where it is placed.
|
||||
Should you need to do changes to the tables you can do so, but beware of the consequences.
|
||||
|
||||
|
||||
Contact us
|
||||
----------
|
||||
|
||||
In case of errors, bugs, questions, wishes, please don't hesitate to contact us
|
||||
under the email address above.
|
||||
|
||||
The team of phlyLabs
|
||||
http://phlylabs.de
|
||||
mailto:phlymail@phlylabs.de
|
969
libraries/simplepie/idn/idna_convert.class.php
Normal file
969
libraries/simplepie/idn/idna_convert.class.php
Normal file
@ -0,0 +1,969 @@
|
||||
<?php
|
||||
// {{{ license
|
||||
|
||||
/* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4 foldmethod=marker: */
|
||||
//
|
||||
// +----------------------------------------------------------------------+
|
||||
// | This library is free software; you can redistribute it and/or modify |
|
||||
// | it under the terms of the GNU Lesser General Public License as |
|
||||
// | published by the Free Software Foundation; either version 2.1 of the |
|
||||
// | License, or (at your option) any later version. |
|
||||
// | |
|
||||
// | This library is distributed in the hope that it will be useful, but |
|
||||
// | WITHOUT ANY WARRANTY; without even the implied warranty of |
|
||||
// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
|
||||
// | Lesser General Public License for more details. |
|
||||
// | |
|
||||
// | You should have received a copy of the GNU Lesser General Public |
|
||||
// | License along with this library; if not, write to the Free Software |
|
||||
// | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 |
|
||||
// | USA. |
|
||||
// +----------------------------------------------------------------------+
|
||||
//
|
||||
|
||||
// }}}
|
||||
|
||||
/**
|
||||
* Encode/decode Internationalized Domain Names.
|
||||
*
|
||||
* The class allows to convert internationalized domain names
|
||||
* (see RFC 3490 for details) as they can be used with various registries worldwide
|
||||
* to be translated between their original (localized) form and their encoded form
|
||||
* as it will be used in the DNS (Domain Name System).
|
||||
*
|
||||
* The class provides two public methods, encode() and decode(), which do exactly
|
||||
* what you would expect them to do. You are allowed to use complete domain names,
|
||||
* simple strings and complete email addresses as well. That means, that you might
|
||||
* use any of the following notations:
|
||||
*
|
||||
* - www.nörgler.com
|
||||
* - xn--nrgler-wxa
|
||||
* - xn--brse-5qa.xn--knrz-1ra.info
|
||||
*
|
||||
* Unicode input might be given as either UTF-8 string, UCS-4 string or UCS-4
|
||||
* array. Unicode output is available in the same formats.
|
||||
* You can select your preferred format via {@link set_paramter()}.
|
||||
*
|
||||
* ACE input and output is always expected to be ASCII.
|
||||
*
|
||||
* @author Matthias Sommerfeld <mso@phlylabs.de>
|
||||
* @copyright 2004-2007 phlyLabs Berlin, http://phlylabs.de
|
||||
* @version 0.5.1
|
||||
*
|
||||
*/
|
||||
class idna_convert
|
||||
{
|
||||
/**
|
||||
* Holds all relevant mapping tables, loaded from a seperate file on construct
|
||||
* See RFC3454 for details
|
||||
*
|
||||
* @var array
|
||||
* @access private
|
||||
*/
|
||||
var $NP = array();
|
||||
|
||||
// Internal settings, do not mess with them
|
||||
var $_punycode_prefix = 'xn--';
|
||||
var $_invalid_ucs = 0x80000000;
|
||||
var $_max_ucs = 0x10FFFF;
|
||||
var $_base = 36;
|
||||
var $_tmin = 1;
|
||||
var $_tmax = 26;
|
||||
var $_skew = 38;
|
||||
var $_damp = 700;
|
||||
var $_initial_bias = 72;
|
||||
var $_initial_n = 0x80;
|
||||
var $_sbase = 0xAC00;
|
||||
var $_lbase = 0x1100;
|
||||
var $_vbase = 0x1161;
|
||||
var $_tbase = 0x11A7;
|
||||
var $_lcount = 19;
|
||||
var $_vcount = 21;
|
||||
var $_tcount = 28;
|
||||
var $_ncount = 588; // _vcount * _tcount
|
||||
var $_scount = 11172; // _lcount * _tcount * _vcount
|
||||
var $_error = false;
|
||||
|
||||
// See {@link set_paramter()} for details of how to change the following
|
||||
// settings from within your script / application
|
||||
var $_api_encoding = 'utf8'; // Default input charset is UTF-8
|
||||
var $_allow_overlong = false; // Overlong UTF-8 encodings are forbidden
|
||||
var $_strict_mode = false; // Behave strict or not
|
||||
|
||||
// The constructor
|
||||
function idna_convert($options = false)
|
||||
{
|
||||
$this->slast = $this->_sbase + $this->_lcount * $this->_vcount * $this->_tcount;
|
||||
if (function_exists('file_get_contents')) {
|
||||
$this->NP = unserialize(file_get_contents(dirname(__FILE__).'/npdata.ser'));
|
||||
} else {
|
||||
$this->NP = unserialize(join('', file(dirname(__FILE__).'/npdata.ser')));
|
||||
}
|
||||
// If parameters are given, pass these to the respective method
|
||||
if (is_array($options)) {
|
||||
return $this->set_parameter($options);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets a new option value. Available options and values:
|
||||
* [encoding - Use either UTF-8, UCS4 as array or UCS4 as string as input ('utf8' for UTF-8,
|
||||
* 'ucs4_string' and 'ucs4_array' respectively for UCS4); The output is always UTF-8]
|
||||
* [overlong - Unicode does not allow unnecessarily long encodings of chars,
|
||||
* to allow this, set this parameter to true, else to false;
|
||||
* default is false.]
|
||||
* [strict - true: strict mode, good for registration purposes - Causes errors
|
||||
* on failures; false: loose mode, ideal for "wildlife" applications
|
||||
* by silently ignoring errors and returning the original input instead
|
||||
*
|
||||
* @param mixed Parameter to set (string: single parameter; array of Parameter => Value pairs)
|
||||
* @param string Value to use (if parameter 1 is a string)
|
||||
* @return boolean true on success, false otherwise
|
||||
* @access public
|
||||
*/
|
||||
function set_parameter($option, $value = false)
|
||||
{
|
||||
if (!is_array($option)) {
|
||||
$option = array($option => $value);
|
||||
}
|
||||
foreach ($option as $k => $v) {
|
||||
switch ($k) {
|
||||
case 'encoding':
|
||||
switch ($v) {
|
||||
case 'utf8':
|
||||
case 'ucs4_string':
|
||||
case 'ucs4_array':
|
||||
$this->_api_encoding = $v;
|
||||
break;
|
||||
default:
|
||||
$this->_error('Set Parameter: Unknown parameter '.$v.' for option '.$k);
|
||||
return false;
|
||||
}
|
||||
break;
|
||||
case 'overlong':
|
||||
$this->_allow_overlong = ($v) ? true : false;
|
||||
break;
|
||||
case 'strict':
|
||||
$this->_strict_mode = ($v) ? true : false;
|
||||
break;
|
||||
default:
|
||||
$this->_error('Set Parameter: Unknown option '.$k);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Decode a given ACE domain name
|
||||
* @param string Domain name (ACE string)
|
||||
* [@param string Desired output encoding, see {@link set_parameter}]
|
||||
* @return string Decoded Domain name (UTF-8 or UCS-4)
|
||||
* @access public
|
||||
*/
|
||||
function decode($input, $one_time_encoding = false)
|
||||
{
|
||||
// Optionally set
|
||||
if ($one_time_encoding) {
|
||||
switch ($one_time_encoding) {
|
||||
case 'utf8':
|
||||
case 'ucs4_string':
|
||||
case 'ucs4_array':
|
||||
break;
|
||||
default:
|
||||
$this->_error('Unknown encoding '.$one_time_encoding);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
// Make sure to drop any newline characters around
|
||||
$input = trim($input);
|
||||
|
||||
// Negotiate input and try to determine, whether it is a plain string,
|
||||
// an email address or something like a complete URL
|
||||
if (strpos($input, '@')) { // Maybe it is an email address
|
||||
// No no in strict mode
|
||||
if ($this->_strict_mode) {
|
||||
$this->_error('Only simple domain name parts can be handled in strict mode');
|
||||
return false;
|
||||
}
|
||||
list ($email_pref, $input) = explode('@', $input, 2);
|
||||
$arr = explode('.', $input);
|
||||
foreach ($arr as $k => $v) {
|
||||
if (preg_match('!^'.preg_quote($this->_punycode_prefix, '!').'!', $v)) {
|
||||
$conv = $this->_decode($v);
|
||||
if ($conv) $arr[$k] = $conv;
|
||||
}
|
||||
}
|
||||
$input = join('.', $arr);
|
||||
$arr = explode('.', $email_pref);
|
||||
foreach ($arr as $k => $v) {
|
||||
if (preg_match('!^'.preg_quote($this->_punycode_prefix, '!').'!', $v)) {
|
||||
$conv = $this->_decode($v);
|
||||
if ($conv) $arr[$k] = $conv;
|
||||
}
|
||||
}
|
||||
$email_pref = join('.', $arr);
|
||||
$return = $email_pref . '@' . $input;
|
||||
} elseif (preg_match('![:\./]!', $input)) { // Or a complete domain name (with or without paths / parameters)
|
||||
// No no in strict mode
|
||||
if ($this->_strict_mode) {
|
||||
$this->_error('Only simple domain name parts can be handled in strict mode');
|
||||
return false;
|
||||
}
|
||||
$parsed = parse_url($input);
|
||||
if (isset($parsed['host'])) {
|
||||
$arr = explode('.', $parsed['host']);
|
||||
foreach ($arr as $k => $v) {
|
||||
$conv = $this->_decode($v);
|
||||
if ($conv) $arr[$k] = $conv;
|
||||
}
|
||||
$parsed['host'] = join('.', $arr);
|
||||
$return =
|
||||
(empty($parsed['scheme']) ? '' : $parsed['scheme'].(strtolower($parsed['scheme']) == 'mailto' ? ':' : '://'))
|
||||
.(empty($parsed['user']) ? '' : $parsed['user'].(empty($parsed['pass']) ? '' : ':'.$parsed['pass']).'@')
|
||||
.$parsed['host']
|
||||
.(empty($parsed['port']) ? '' : ':'.$parsed['port'])
|
||||
.(empty($parsed['path']) ? '' : $parsed['path'])
|
||||
.(empty($parsed['query']) ? '' : '?'.$parsed['query'])
|
||||
.(empty($parsed['fragment']) ? '' : '#'.$parsed['fragment']);
|
||||
} else { // parse_url seems to have failed, try without it
|
||||
$arr = explode('.', $input);
|
||||
foreach ($arr as $k => $v) {
|
||||
$conv = $this->_decode($v);
|
||||
$arr[$k] = ($conv) ? $conv : $v;
|
||||
}
|
||||
$return = join('.', $arr);
|
||||
}
|
||||
} else { // Otherwise we consider it being a pure domain name string
|
||||
$return = $this->_decode($input);
|
||||
if (!$return) $return = $input;
|
||||
}
|
||||
// The output is UTF-8 by default, other output formats need conversion here
|
||||
// If one time encoding is given, use this, else the objects property
|
||||
switch (($one_time_encoding) ? $one_time_encoding : $this->_api_encoding) {
|
||||
case 'utf8':
|
||||
return $return;
|
||||
break;
|
||||
case 'ucs4_string':
|
||||
return $this->_ucs4_to_ucs4_string($this->_utf8_to_ucs4($return));
|
||||
break;
|
||||
case 'ucs4_array':
|
||||
return $this->_utf8_to_ucs4($return);
|
||||
break;
|
||||
default:
|
||||
$this->_error('Unsupported output format');
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Encode a given UTF-8 domain name
|
||||
* @param string Domain name (UTF-8 or UCS-4)
|
||||
* [@param string Desired input encoding, see {@link set_parameter}]
|
||||
* @return string Encoded Domain name (ACE string)
|
||||
* @access public
|
||||
*/
|
||||
function encode($decoded, $one_time_encoding = false)
|
||||
{
|
||||
// Forcing conversion of input to UCS4 array
|
||||
// If one time encoding is given, use this, else the objects property
|
||||
switch ($one_time_encoding ? $one_time_encoding : $this->_api_encoding) {
|
||||
case 'utf8':
|
||||
$decoded = $this->_utf8_to_ucs4($decoded);
|
||||
break;
|
||||
case 'ucs4_string':
|
||||
$decoded = $this->_ucs4_string_to_ucs4($decoded);
|
||||
case 'ucs4_array':
|
||||
break;
|
||||
default:
|
||||
$this->_error('Unsupported input format: '.($one_time_encoding ? $one_time_encoding : $this->_api_encoding));
|
||||
return false;
|
||||
}
|
||||
|
||||
// No input, no output, what else did you expect?
|
||||
if (empty($decoded)) return '';
|
||||
|
||||
// Anchors for iteration
|
||||
$last_begin = 0;
|
||||
// Output string
|
||||
$output = '';
|
||||
foreach ($decoded as $k => $v) {
|
||||
// Make sure to use just the plain dot
|
||||
switch($v) {
|
||||
case 0x3002:
|
||||
case 0xFF0E:
|
||||
case 0xFF61:
|
||||
$decoded[$k] = 0x2E;
|
||||
// Right, no break here, the above are converted to dots anyway
|
||||
// Stumbling across an anchoring character
|
||||
case 0x2E:
|
||||
case 0x2F:
|
||||
case 0x3A:
|
||||
case 0x3F:
|
||||
case 0x40:
|
||||
// Neither email addresses nor URLs allowed in strict mode
|
||||
if ($this->_strict_mode) {
|
||||
$this->_error('Neither email addresses nor URLs are allowed in strict mode.');
|
||||
return false;
|
||||
} else {
|
||||
// Skip first char
|
||||
if ($k) {
|
||||
$encoded = '';
|
||||
$encoded = $this->_encode(array_slice($decoded, $last_begin, (($k)-$last_begin)));
|
||||
if ($encoded) {
|
||||
$output .= $encoded;
|
||||
} else {
|
||||
$output .= $this->_ucs4_to_utf8(array_slice($decoded, $last_begin, (($k)-$last_begin)));
|
||||
}
|
||||
$output .= chr($decoded[$k]);
|
||||
}
|
||||
$last_begin = $k + 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
// Catch the rest of the string
|
||||
if ($last_begin) {
|
||||
$inp_len = sizeof($decoded);
|
||||
$encoded = '';
|
||||
$encoded = $this->_encode(array_slice($decoded, $last_begin, (($inp_len)-$last_begin)));
|
||||
if ($encoded) {
|
||||
$output .= $encoded;
|
||||
} else {
|
||||
$output .= $this->_ucs4_to_utf8(array_slice($decoded, $last_begin, (($inp_len)-$last_begin)));
|
||||
}
|
||||
return $output;
|
||||
} else {
|
||||
if ($output = $this->_encode($decoded)) {
|
||||
return $output;
|
||||
} else {
|
||||
return $this->_ucs4_to_utf8($decoded);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Use this method to get the last error ocurred
|
||||
* @param void
|
||||
* @return string The last error, that occured
|
||||
* @access public
|
||||
*/
|
||||
function get_last_error()
|
||||
{
|
||||
return $this->_error;
|
||||
}
|
||||
|
||||
/**
|
||||
* The actual decoding algorithm
|
||||
* @access private
|
||||
*/
|
||||
function _decode($encoded)
|
||||
{
|
||||
// We do need to find the Punycode prefix
|
||||
if (!preg_match('!^'.preg_quote($this->_punycode_prefix, '!').'!', $encoded)) {
|
||||
$this->_error('This is not a punycode string');
|
||||
return false;
|
||||
}
|
||||
$encode_test = preg_replace('!^'.preg_quote($this->_punycode_prefix, '!').'!', '', $encoded);
|
||||
// If nothing left after removing the prefix, it is hopeless
|
||||
if (!$encode_test) {
|
||||
$this->_error('The given encoded string was empty');
|
||||
return false;
|
||||
}
|
||||
// Find last occurence of the delimiter
|
||||
$delim_pos = strrpos($encoded, '-');
|
||||
if ($delim_pos > strlen($this->_punycode_prefix)) {
|
||||
for ($k = strlen($this->_punycode_prefix); $k < $delim_pos; ++$k) {
|
||||
$decoded[] = ord($encoded{$k});
|
||||
}
|
||||
} else {
|
||||
$decoded = array();
|
||||
}
|
||||
$deco_len = count($decoded);
|
||||
$enco_len = strlen($encoded);
|
||||
|
||||
// Wandering through the strings; init
|
||||
$is_first = true;
|
||||
$bias = $this->_initial_bias;
|
||||
$idx = 0;
|
||||
$char = $this->_initial_n;
|
||||
|
||||
for ($enco_idx = ($delim_pos) ? ($delim_pos + 1) : 0; $enco_idx < $enco_len; ++$deco_len) {
|
||||
for ($old_idx = $idx, $w = 1, $k = $this->_base; 1 ; $k += $this->_base) {
|
||||
$digit = $this->_decode_digit($encoded{$enco_idx++});
|
||||
$idx += $digit * $w;
|
||||
$t = ($k <= $bias) ? $this->_tmin :
|
||||
(($k >= $bias + $this->_tmax) ? $this->_tmax : ($k - $bias));
|
||||
if ($digit < $t) break;
|
||||
$w = (int) ($w * ($this->_base - $t));
|
||||
}
|
||||
$bias = $this->_adapt($idx - $old_idx, $deco_len + 1, $is_first);
|
||||
$is_first = false;
|
||||
$char += (int) ($idx / ($deco_len + 1));
|
||||
$idx %= ($deco_len + 1);
|
||||
if ($deco_len > 0) {
|
||||
// Make room for the decoded char
|
||||
for ($i = $deco_len; $i > $idx; $i--) {
|
||||
$decoded[$i] = $decoded[($i - 1)];
|
||||
}
|
||||
}
|
||||
$decoded[$idx++] = $char;
|
||||
}
|
||||
return $this->_ucs4_to_utf8($decoded);
|
||||
}
|
||||
|
||||
/**
|
||||
* The actual encoding algorithm
|
||||
* @access private
|
||||
*/
|
||||
function _encode($decoded)
|
||||
{
|
||||
// We cannot encode a domain name containing the Punycode prefix
|
||||
$extract = strlen($this->_punycode_prefix);
|
||||
$check_pref = $this->_utf8_to_ucs4($this->_punycode_prefix);
|
||||
$check_deco = array_slice($decoded, 0, $extract);
|
||||
|
||||
if ($check_pref == $check_deco) {
|
||||
$this->_error('This is already a punycode string');
|
||||
return false;
|
||||
}
|
||||
// We will not try to encode strings consisting of basic code points only
|
||||
$encodable = false;
|
||||
foreach ($decoded as $k => $v) {
|
||||
if ($v > 0x7a) {
|
||||
$encodable = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (!$encodable) {
|
||||
$this->_error('The given string does not contain encodable chars');
|
||||
return false;
|
||||
}
|
||||
|
||||
// Do NAMEPREP
|
||||
$decoded = $this->_nameprep($decoded);
|
||||
if (!$decoded || !is_array($decoded)) return false; // NAMEPREP failed
|
||||
|
||||
$deco_len = count($decoded);
|
||||
if (!$deco_len) return false; // Empty array
|
||||
|
||||
$codecount = 0; // How many chars have been consumed
|
||||
|
||||
$encoded = '';
|
||||
// Copy all basic code points to output
|
||||
for ($i = 0; $i < $deco_len; ++$i) {
|
||||
$test = $decoded[$i];
|
||||
// Will match [-0-9a-zA-Z]
|
||||
if ((0x2F < $test && $test < 0x40) || (0x40 < $test && $test < 0x5B)
|
||||
|| (0x60 < $test && $test <= 0x7B) || (0x2D == $test)) {
|
||||
$encoded .= chr($decoded[$i]);
|
||||
$codecount++;
|
||||
}
|
||||
}
|
||||
if ($codecount == $deco_len) return $encoded; // All codepoints were basic ones
|
||||
|
||||
// Start with the prefix; copy it to output
|
||||
$encoded = $this->_punycode_prefix.$encoded;
|
||||
|
||||
// If we have basic code points in output, add an hyphen to the end
|
||||
if ($codecount) $encoded .= '-';
|
||||
|
||||
// Now find and encode all non-basic code points
|
||||
$is_first = true;
|
||||
$cur_code = $this->_initial_n;
|
||||
$bias = $this->_initial_bias;
|
||||
$delta = 0;
|
||||
while ($codecount < $deco_len) {
|
||||
// Find the smallest code point >= the current code point and
|
||||
// remember the last ouccrence of it in the input
|
||||
for ($i = 0, $next_code = $this->_max_ucs; $i < $deco_len; $i++) {
|
||||
if ($decoded[$i] >= $cur_code && $decoded[$i] <= $next_code) {
|
||||
$next_code = $decoded[$i];
|
||||
}
|
||||
}
|
||||
|
||||
$delta += ($next_code - $cur_code) * ($codecount + 1);
|
||||
$cur_code = $next_code;
|
||||
|
||||
// Scan input again and encode all characters whose code point is $cur_code
|
||||
for ($i = 0; $i < $deco_len; $i++) {
|
||||
if ($decoded[$i] < $cur_code) {
|
||||
$delta++;
|
||||
} elseif ($decoded[$i] == $cur_code) {
|
||||
for ($q = $delta, $k = $this->_base; 1; $k += $this->_base) {
|
||||
$t = ($k <= $bias) ? $this->_tmin :
|
||||
(($k >= $bias + $this->_tmax) ? $this->_tmax : $k - $bias);
|
||||
if ($q < $t) break;
|
||||
$encoded .= $this->_encode_digit(intval($t + (($q - $t) % ($this->_base - $t)))); //v0.4.5 Changed from ceil() to intval()
|
||||
$q = (int) (($q - $t) / ($this->_base - $t));
|
||||
}
|
||||
$encoded .= $this->_encode_digit($q);
|
||||
$bias = $this->_adapt($delta, $codecount+1, $is_first);
|
||||
$codecount++;
|
||||
$delta = 0;
|
||||
$is_first = false;
|
||||
}
|
||||
}
|
||||
$delta++;
|
||||
$cur_code++;
|
||||
}
|
||||
return $encoded;
|
||||
}
|
||||
|
||||
/**
|
||||
* Adapt the bias according to the current code point and position
|
||||
* @access private
|
||||
*/
|
||||
function _adapt($delta, $npoints, $is_first)
|
||||
{
|
||||
$delta = intval($is_first ? ($delta / $this->_damp) : ($delta / 2));
|
||||
$delta += intval($delta / $npoints);
|
||||
for ($k = 0; $delta > (($this->_base - $this->_tmin) * $this->_tmax) / 2; $k += $this->_base) {
|
||||
$delta = intval($delta / ($this->_base - $this->_tmin));
|
||||
}
|
||||
return intval($k + ($this->_base - $this->_tmin + 1) * $delta / ($delta + $this->_skew));
|
||||
}
|
||||
|
||||
/**
|
||||
* Encoding a certain digit
|
||||
* @access private
|
||||
*/
|
||||
function _encode_digit($d)
|
||||
{
|
||||
return chr($d + 22 + 75 * ($d < 26));
|
||||
}
|
||||
|
||||
/**
|
||||
* Decode a certain digit
|
||||
* @access private
|
||||
*/
|
||||
function _decode_digit($cp)
|
||||
{
|
||||
$cp = ord($cp);
|
||||
return ($cp - 48 < 10) ? $cp - 22 : (($cp - 65 < 26) ? $cp - 65 : (($cp - 97 < 26) ? $cp - 97 : $this->_base));
|
||||
}
|
||||
|
||||
/**
|
||||
* Internal error handling method
|
||||
* @access private
|
||||
*/
|
||||
function _error($error = '')
|
||||
{
|
||||
$this->_error = $error;
|
||||
}
|
||||
|
||||
/**
|
||||
* Do Nameprep according to RFC3491 and RFC3454
|
||||
* @param array Unicode Characters
|
||||
* @return string Unicode Characters, Nameprep'd
|
||||
* @access private
|
||||
*/
|
||||
function _nameprep($input)
|
||||
{
|
||||
$output = array();
|
||||
$error = false;
|
||||
//
|
||||
// Mapping
|
||||
// Walking through the input array, performing the required steps on each of
|
||||
// the input chars and putting the result into the output array
|
||||
// While mapping required chars we apply the cannonical ordering
|
||||
foreach ($input as $v) {
|
||||
// Map to nothing == skip that code point
|
||||
if (in_array($v, $this->NP['map_nothing'])) continue;
|
||||
|
||||
// Try to find prohibited input
|
||||
if (in_array($v, $this->NP['prohibit']) || in_array($v, $this->NP['general_prohibited'])) {
|
||||
$this->_error('NAMEPREP: Prohibited input U+'.sprintf('%08X', $v));
|
||||
return false;
|
||||
}
|
||||
foreach ($this->NP['prohibit_ranges'] as $range) {
|
||||
if ($range[0] <= $v && $v <= $range[1]) {
|
||||
$this->_error('NAMEPREP: Prohibited input U+'.sprintf('%08X', $v));
|
||||
return false;
|
||||
}
|
||||
}
|
||||
//
|
||||
// Hangul syllable decomposition
|
||||
if (0xAC00 <= $v && $v <= 0xD7AF) {
|
||||
foreach ($this->_hangul_decompose($v) as $out) {
|
||||
$output[] = (int) $out;
|
||||
}
|
||||
// There's a decomposition mapping for that code point
|
||||
} elseif (isset($this->NP['replacemaps'][$v])) {
|
||||
foreach ($this->_apply_cannonical_ordering($this->NP['replacemaps'][$v]) as $out) {
|
||||
$output[] = (int) $out;
|
||||
}
|
||||
} else {
|
||||
$output[] = (int) $v;
|
||||
}
|
||||
}
|
||||
// Before applying any Combining, try to rearrange any Hangul syllables
|
||||
$output = $this->_hangul_compose($output);
|
||||
//
|
||||
// Combine code points
|
||||
//
|
||||
$last_class = 0;
|
||||
$last_starter = 0;
|
||||
$out_len = count($output);
|
||||
for ($i = 0; $i < $out_len; ++$i) {
|
||||
$class = $this->_get_combining_class($output[$i]);
|
||||
if ((!$last_class || $last_class > $class) && $class) {
|
||||
// Try to match
|
||||
$seq_len = $i - $last_starter;
|
||||
$out = $this->_combine(array_slice($output, $last_starter, $seq_len));
|
||||
// On match: Replace the last starter with the composed character and remove
|
||||
// the now redundant non-starter(s)
|
||||
if ($out) {
|
||||
$output[$last_starter] = $out;
|
||||
if (count($out) != $seq_len) {
|
||||
for ($j = $i+1; $j < $out_len; ++$j) {
|
||||
$output[$j-1] = $output[$j];
|
||||
}
|
||||
unset($output[$out_len]);
|
||||
}
|
||||
// Rewind the for loop by one, since there can be more possible compositions
|
||||
$i--;
|
||||
$out_len--;
|
||||
$last_class = ($i == $last_starter) ? 0 : $this->_get_combining_class($output[$i-1]);
|
||||
continue;
|
||||
}
|
||||
}
|
||||
// The current class is 0
|
||||
if (!$class) $last_starter = $i;
|
||||
$last_class = $class;
|
||||
}
|
||||
return $output;
|
||||
}
|
||||
|
||||
/**
|
||||
* Decomposes a Hangul syllable
|
||||
* (see http://www.unicode.org/unicode/reports/tr15/#Hangul
|
||||
* @param integer 32bit UCS4 code point
|
||||
* @return array Either Hangul Syllable decomposed or original 32bit value as one value array
|
||||
* @access private
|
||||
*/
|
||||
function _hangul_decompose($char)
|
||||
{
|
||||
$sindex = (int) $char - $this->_sbase;
|
||||
if ($sindex < 0 || $sindex >= $this->_scount) {
|
||||
return array($char);
|
||||
}
|
||||
$result = array();
|
||||
$result[] = (int) $this->_lbase + $sindex / $this->_ncount;
|
||||
$result[] = (int) $this->_vbase + ($sindex % $this->_ncount) / $this->_tcount;
|
||||
$T = intval($this->_tbase + $sindex % $this->_tcount);
|
||||
if ($T != $this->_tbase) $result[] = $T;
|
||||
return $result;
|
||||
}
|
||||
/**
|
||||
* Ccomposes a Hangul syllable
|
||||
* (see http://www.unicode.org/unicode/reports/tr15/#Hangul
|
||||
* @param array Decomposed UCS4 sequence
|
||||
* @return array UCS4 sequence with syllables composed
|
||||
* @access private
|
||||
*/
|
||||
function _hangul_compose($input)
|
||||
{
|
||||
$inp_len = count($input);
|
||||
if (!$inp_len) return array();
|
||||
$result = array();
|
||||
$last = (int) $input[0];
|
||||
$result[] = $last; // copy first char from input to output
|
||||
|
||||
for ($i = 1; $i < $inp_len; ++$i) {
|
||||
$char = (int) $input[$i];
|
||||
$sindex = $last - $this->_sbase;
|
||||
$lindex = $last - $this->_lbase;
|
||||
$vindex = $char - $this->_vbase;
|
||||
$tindex = $char - $this->_tbase;
|
||||
// Find out, whether two current characters are LV and T
|
||||
if (0 <= $sindex && $sindex < $this->_scount && ($sindex % $this->_tcount == 0)
|
||||
&& 0 <= $tindex && $tindex <= $this->_tcount) {
|
||||
// create syllable of form LVT
|
||||
$last += $tindex;
|
||||
$result[(count($result) - 1)] = $last; // reset last
|
||||
continue; // discard char
|
||||
}
|
||||
// Find out, whether two current characters form L and V
|
||||
if (0 <= $lindex && $lindex < $this->_lcount && 0 <= $vindex && $vindex < $this->_vcount) {
|
||||
// create syllable of form LV
|
||||
$last = (int) $this->_sbase + ($lindex * $this->_vcount + $vindex) * $this->_tcount;
|
||||
$result[(count($result) - 1)] = $last; // reset last
|
||||
continue; // discard char
|
||||
}
|
||||
// if neither case was true, just add the character
|
||||
$last = $char;
|
||||
$result[] = $char;
|
||||
}
|
||||
return $result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the combining class of a certain wide char
|
||||
* @param integer Wide char to check (32bit integer)
|
||||
* @return integer Combining class if found, else 0
|
||||
* @access private
|
||||
*/
|
||||
function _get_combining_class($char)
|
||||
{
|
||||
return isset($this->NP['norm_combcls'][$char]) ? $this->NP['norm_combcls'][$char] : 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* Apllies the cannonical ordering of a decomposed UCS4 sequence
|
||||
* @param array Decomposed UCS4 sequence
|
||||
* @return array Ordered USC4 sequence
|
||||
* @access private
|
||||
*/
|
||||
function _apply_cannonical_ordering($input)
|
||||
{
|
||||
$swap = true;
|
||||
$size = count($input);
|
||||
while ($swap) {
|
||||
$swap = false;
|
||||
$last = $this->_get_combining_class(intval($input[0]));
|
||||
for ($i = 0; $i < $size-1; ++$i) {
|
||||
$next = $this->_get_combining_class(intval($input[$i+1]));
|
||||
if ($next != 0 && $last > $next) {
|
||||
// Move item leftward until it fits
|
||||
for ($j = $i + 1; $j > 0; --$j) {
|
||||
if ($this->_get_combining_class(intval($input[$j-1])) <= $next) break;
|
||||
$t = intval($input[$j]);
|
||||
$input[$j] = intval($input[$j-1]);
|
||||
$input[$j-1] = $t;
|
||||
$swap = true;
|
||||
}
|
||||
// Reentering the loop looking at the old character again
|
||||
$next = $last;
|
||||
}
|
||||
$last = $next;
|
||||
}
|
||||
}
|
||||
return $input;
|
||||
}
|
||||
|
||||
/**
|
||||
* Do composition of a sequence of starter and non-starter
|
||||
* @param array UCS4 Decomposed sequence
|
||||
* @return array Ordered USC4 sequence
|
||||
* @access private
|
||||
*/
|
||||
function _combine($input)
|
||||
{
|
||||
$inp_len = count($input);
|
||||
foreach ($this->NP['replacemaps'] as $np_src => $np_target) {
|
||||
if ($np_target[0] != $input[0]) continue;
|
||||
if (count($np_target) != $inp_len) continue;
|
||||
$hit = false;
|
||||
foreach ($input as $k2 => $v2) {
|
||||
if ($v2 == $np_target[$k2]) {
|
||||
$hit = true;
|
||||
} else {
|
||||
$hit = false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if ($hit) return $np_src;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* This converts an UTF-8 encoded string to its UCS-4 representation
|
||||
* By talking about UCS-4 "strings" we mean arrays of 32bit integers representing
|
||||
* each of the "chars". This is due to PHP not being able to handle strings with
|
||||
* bit depth different from 8. This apllies to the reverse method _ucs4_to_utf8(), too.
|
||||
* The following UTF-8 encodings are supported:
|
||||
* bytes bits representation
|
||||
* 1 7 0xxxxxxx
|
||||
* 2 11 110xxxxx 10xxxxxx
|
||||
* 3 16 1110xxxx 10xxxxxx 10xxxxxx
|
||||
* 4 21 11110xxx 10xxxxxx 10xxxxxx 10xxxxxx
|
||||
* 5 26 111110xx 10xxxxxx 10xxxxxx 10xxxxxx 10xxxxxx
|
||||
* 6 31 1111110x 10xxxxxx 10xxxxxx 10xxxxxx 10xxxxxx 10xxxxxx
|
||||
* Each x represents a bit that can be used to store character data.
|
||||
* The five and six byte sequences are part of Annex D of ISO/IEC 10646-1:2000
|
||||
* @access private
|
||||
*/
|
||||
function _utf8_to_ucs4($input)
|
||||
{
|
||||
$output = array();
|
||||
$out_len = 0;
|
||||
$inp_len = strlen($input);
|
||||
$mode = 'next';
|
||||
$test = 'none';
|
||||
for ($k = 0; $k < $inp_len; ++$k) {
|
||||
$v = ord($input{$k}); // Extract byte from input string
|
||||
|
||||
if ($v < 128) { // We found an ASCII char - put into stirng as is
|
||||
$output[$out_len] = $v;
|
||||
++$out_len;
|
||||
if ('add' == $mode) {
|
||||
$this->_error('Conversion from UTF-8 to UCS-4 failed: malformed input at byte '.$k);
|
||||
return false;
|
||||
}
|
||||
continue;
|
||||
}
|
||||
if ('next' == $mode) { // Try to find the next start byte; determine the width of the Unicode char
|
||||
$start_byte = $v;
|
||||
$mode = 'add';
|
||||
$test = 'range';
|
||||
if ($v >> 5 == 6) { // &110xxxxx 10xxxxx
|
||||
$next_byte = 0; // Tells, how many times subsequent bitmasks must rotate 6bits to the left
|
||||
$v = ($v - 192) << 6;
|
||||
} elseif ($v >> 4 == 14) { // &1110xxxx 10xxxxxx 10xxxxxx
|
||||
$next_byte = 1;
|
||||
$v = ($v - 224) << 12;
|
||||
} elseif ($v >> 3 == 30) { // &11110xxx 10xxxxxx 10xxxxxx 10xxxxxx
|
||||
$next_byte = 2;
|
||||
$v = ($v - 240) << 18;
|
||||
} elseif ($v >> 2 == 62) { // &111110xx 10xxxxxx 10xxxxxx 10xxxxxx 10xxxxxx
|
||||
$next_byte = 3;
|
||||
$v = ($v - 248) << 24;
|
||||
} elseif ($v >> 1 == 126) { // &1111110x 10xxxxxx 10xxxxxx 10xxxxxx 10xxxxxx 10xxxxxx
|
||||
$next_byte = 4;
|
||||
$v = ($v - 252) << 30;
|
||||
} else {
|
||||
$this->_error('This might be UTF-8, but I don\'t understand it at byte '.$k);
|
||||
return false;
|
||||
}
|
||||
if ('add' == $mode) {
|
||||
$output[$out_len] = (int) $v;
|
||||
++$out_len;
|
||||
continue;
|
||||
}
|
||||
}
|
||||
if ('add' == $mode) {
|
||||
if (!$this->_allow_overlong && $test == 'range') {
|
||||
$test = 'none';
|
||||
if (($v < 0xA0 && $start_byte == 0xE0) || ($v < 0x90 && $start_byte == 0xF0) || ($v > 0x8F && $start_byte == 0xF4)) {
|
||||
$this->_error('Bogus UTF-8 character detected (out of legal range) at byte '.$k);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
if ($v >> 6 == 2) { // Bit mask must be 10xxxxxx
|
||||
$v = ($v - 128) << ($next_byte * 6);
|
||||
$output[($out_len - 1)] += $v;
|
||||
--$next_byte;
|
||||
} else {
|
||||
$this->_error('Conversion from UTF-8 to UCS-4 failed: malformed input at byte '.$k);
|
||||
return false;
|
||||
}
|
||||
if ($next_byte < 0) {
|
||||
$mode = 'next';
|
||||
}
|
||||
}
|
||||
} // for
|
||||
return $output;
|
||||
}
|
||||
|
||||
/**
|
||||
* Convert UCS-4 string into UTF-8 string
|
||||
* See _utf8_to_ucs4() for details
|
||||
* @access private
|
||||
*/
|
||||
function _ucs4_to_utf8($input)
|
||||
{
|
||||
$output = '';
|
||||
$k = 0;
|
||||
foreach ($input as $v) {
|
||||
++$k;
|
||||
// $v = ord($v);
|
||||
if ($v < 128) { // 7bit are transferred literally
|
||||
$output .= chr($v);
|
||||
} elseif ($v < (1 << 11)) { // 2 bytes
|
||||
$output .= chr(192 + ($v >> 6)) . chr(128 + ($v & 63));
|
||||
} elseif ($v < (1 << 16)) { // 3 bytes
|
||||
$output .= chr(224 + ($v >> 12)) . chr(128 + (($v >> 6) & 63)) . chr(128 + ($v & 63));
|
||||
} elseif ($v < (1 << 21)) { // 4 bytes
|
||||
$output .= chr(240 + ($v >> 18)) . chr(128 + (($v >> 12) & 63))
|
||||
. chr(128 + (($v >> 6) & 63)) . chr(128 + ($v & 63));
|
||||
} elseif ($v < (1 << 26)) { // 5 bytes
|
||||
$output .= chr(248 + ($v >> 24)) . chr(128 + (($v >> 18) & 63))
|
||||
. chr(128 + (($v >> 12) & 63)) . chr(128 + (($v >> 6) & 63))
|
||||
. chr(128 + ($v & 63));
|
||||
} elseif ($v < (1 << 31)) { // 6 bytes
|
||||
$output .= chr(252 + ($v >> 30)) . chr(128 + (($v >> 24) & 63))
|
||||
. chr(128 + (($v >> 18) & 63)) . chr(128 + (($v >> 12) & 63))
|
||||
. chr(128 + (($v >> 6) & 63)) . chr(128 + ($v & 63));
|
||||
} else {
|
||||
$this->_error('Conversion from UCS-4 to UTF-8 failed: malformed input at byte '.$k);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return $output;
|
||||
}
|
||||
|
||||
/**
|
||||
* Convert UCS-4 array into UCS-4 string
|
||||
*
|
||||
* @access private
|
||||
*/
|
||||
function _ucs4_to_ucs4_string($input)
|
||||
{
|
||||
$output = '';
|
||||
// Take array values and split output to 4 bytes per value
|
||||
// The bit mask is 255, which reads &11111111
|
||||
foreach ($input as $v) {
|
||||
$output .= chr(($v >> 24) & 255).chr(($v >> 16) & 255).chr(($v >> 8) & 255).chr($v & 255);
|
||||
}
|
||||
return $output;
|
||||
}
|
||||
|
||||
/**
|
||||
* Convert UCS-4 strin into UCS-4 garray
|
||||
*
|
||||
* @access private
|
||||
*/
|
||||
function _ucs4_string_to_ucs4($input)
|
||||
{
|
||||
$output = array();
|
||||
$inp_len = strlen($input);
|
||||
// Input length must be dividable by 4
|
||||
if ($inp_len % 4) {
|
||||
$this->_error('Input UCS4 string is broken');
|
||||
return false;
|
||||
}
|
||||
// Empty input - return empty output
|
||||
if (!$inp_len) return $output;
|
||||
for ($i = 0, $out_len = -1; $i < $inp_len; ++$i) {
|
||||
// Increment output position every 4 input bytes
|
||||
if (!($i % 4)) {
|
||||
$out_len++;
|
||||
$output[$out_len] = 0;
|
||||
}
|
||||
$output[$out_len] += ord($input{$i}) << (8 * (3 - ($i % 4) ) );
|
||||
}
|
||||
return $output;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Adapter class for aligning the API of idna_convert with that of Net_IDNA
|
||||
* @author Matthias Sommerfeld <mso@phlylabs.de>
|
||||
*/
|
||||
class Net_IDNA_php4 extends idna_convert
|
||||
{
|
||||
/**
|
||||
* Sets a new option value. Available options and values:
|
||||
* [encoding - Use either UTF-8, UCS4 as array or UCS4 as string as input ('utf8' for UTF-8,
|
||||
* 'ucs4_string' and 'ucs4_array' respectively for UCS4); The output is always UTF-8]
|
||||
* [overlong - Unicode does not allow unnecessarily long encodings of chars,
|
||||
* to allow this, set this parameter to true, else to false;
|
||||
* default is false.]
|
||||
* [strict - true: strict mode, good for registration purposes - Causes errors
|
||||
* on failures; false: loose mode, ideal for "wildlife" applications
|
||||
* by silently ignoring errors and returning the original input instead
|
||||
*
|
||||
* @param mixed Parameter to set (string: single parameter; array of Parameter => Value pairs)
|
||||
* @param string Value to use (if parameter 1 is a string)
|
||||
* @return boolean true on success, false otherwise
|
||||
* @access public
|
||||
*/
|
||||
function setParams($option, $param = false)
|
||||
{
|
||||
return $this->IC->set_parameters($option, $param);
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
1
libraries/simplepie/idn/index.html
Normal file
1
libraries/simplepie/idn/index.html
Normal file
@ -0,0 +1 @@
|
||||
<!DOCTYPE html><title></title>
|
1
libraries/simplepie/idn/npdata.ser
Normal file
1
libraries/simplepie/idn/npdata.ser
Normal file
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user