From ccd826f63a7a4c7e442fab8a70d9c4c84808b417 Mon Sep 17 00:00:00 2001 From: Mario Date: Tue, 11 Oct 2022 18:29:06 +0000 Subject: Revert "update composer libs" This reverts commit 5e5f0aa955d86743a14531bed98501b59140ab1f. --- vendor/voku/portable-ascii/.whitesource | 12 ++ vendor/voku/portable-ascii/CHANGELOG.md | 15 +- vendor/voku/portable-ascii/README.md | 33 +---- vendor/voku/portable-ascii/build/composer.json | 5 + vendor/voku/portable-ascii/build/docs/base.md | 127 ++++++++++++++++ vendor/voku/portable-ascii/build/generate_docs.php | 26 ++++ .../build/generate_max_key_length.php | 20 +++ .../voku/portable-ascii/src/voku/helper/ASCII.php | 165 ++++++++++----------- .../src/voku/helper/data/ascii_by_languages.php | 149 ++++++++----------- .../voku/helper/data/ascii_extras_by_languages.php | 8 +- .../voku/helper/data/ascii_language_max_key.php | 2 +- 11 files changed, 348 insertions(+), 214 deletions(-) create mode 100644 vendor/voku/portable-ascii/.whitesource create mode 100644 vendor/voku/portable-ascii/build/composer.json create mode 100644 vendor/voku/portable-ascii/build/docs/base.md create mode 100644 vendor/voku/portable-ascii/build/generate_docs.php create mode 100644 vendor/voku/portable-ascii/build/generate_max_key_length.php (limited to 'vendor/voku') diff --git a/vendor/voku/portable-ascii/.whitesource b/vendor/voku/portable-ascii/.whitesource new file mode 100644 index 000000000..55b922e8c --- /dev/null +++ b/vendor/voku/portable-ascii/.whitesource @@ -0,0 +1,12 @@ +{ + "scanSettings": { + "baseBranches": [] + }, + "checkRunSettings": { + "vulnerableCheckRunConclusionLevel": "failure", + "displayMode": "diff" + }, + "issueSettings": { + "minSeverityLevel": "LOW" + } +} \ No newline at end of file diff --git a/vendor/voku/portable-ascii/CHANGELOG.md b/vendor/voku/portable-ascii/CHANGELOG.md index 12fc393a7..04b64acdd 100644 --- a/vendor/voku/portable-ascii/CHANGELOG.md +++ b/vendor/voku/portable-ascii/CHANGELOG.md @@ -1,23 +1,12 @@ # Changelog -### 2.0.1 (2022-03-08) - -- "To people of Russia": There is a war in Ukraine right now. The forces of the Russian Federation are attacking civilians. -- optimize some phpdocs - -### 2.0.0 (2022-01-24) - -- prefer "Russian - Passport (2013), ICAO" instead of "Russian - GOST 7.79-2000(B)" -- fix "Ukrainian" char-mapping (thanks to @Andr1yk0) -- fix "Persian" char-mapping (thanks to @frost-cyber) - -### 1.6.1 (2022-01-24) +### 1.6.1 (2021-01-24) - revert: prefer "Russian - Passport (2013), ICAO" instead of "Russian - GOST 7.79-2000(B)" - revert: fix "Ukrainian" char-mapping (thanks to @Andr1yk0) - revert: fix "Persian" char-mapping (thanks to @frost-cyber) -### 1.6.0 (2022-01-24) +### 1.6.0 (2021-01-24) - prefer "Russian - Passport (2013), ICAO" instead of "Russian - GOST 7.79-2000(B)" - fix "Ukrainian" char-mapping (thanks to @Andr1yk0) diff --git a/vendor/voku/portable-ascii/README.md b/vendor/voku/portable-ascii/README.md index 3ce36d604..929c21e29 100644 --- a/vendor/voku/portable-ascii/README.md +++ b/vendor/voku/portable-ascii/README.md @@ -1,6 +1,4 @@ [//]: # (AUTO-GENERATED BY "PHP README Helper": base file -> docs/base.md) -[![SWUbanner](https://raw.githubusercontent.com/vshymanskyy/StandWithUkraine/main/banner2-direct.svg)](https://github.com/vshymanskyy/StandWithUkraine/blob/main/docs/README.md) - [![Build Status](https://github.com/voku/portable-ascii/actions/workflows/ci.yml/badge.svg?branch=master)](https://github.com/voku/portable-ascii/actions) [![Build status](https://ci.appveyor.com/api/projects/status/gnejjnk7qplr7f5t/branch/master?svg=true)](https://ci.appveyor.com/project/voku/portable-ascii/branch/master) [![codecov.io](https://codecov.io/github/voku/portable-ascii/coverage.svg?branch=master)](https://codecov.io/github/voku/portable-ascii?branch=master) @@ -101,9 +99,8 @@ The API from the "ASCII"-Class is written as small static methods. normalize_whitespace remove_invisible_characters to_ascii -to_ascii_remap -to_filename -to_slugify +to_filename +to_slugify to_transliterate @@ -155,7 +152,7 @@ echo $array['orig'][$tmpKey]; // 'ё' **Parameters:** -- `ASCII::* $language [optional]

Language of the source string e.g.: en, de_at, or de-ch. +- `string $language [optional]

Language of the source string e.g.: en, de_at, or de-ch. (default is 'en') | ASCII::*_LANGUAGE_CODE

` - `bool $replace_extra_symbols [optional]

Add some more replacements e.g. "£" with " pound ".

` - `bool $asOrigReplaceArray [optional]

TRUE === return {orig: string[], replace: string[]} @@ -311,7 +308,7 @@ ASCII::to_ascii('�Düsseldorf�', 'en'); // Dusseldorf **Parameters:** - `string $str

The input string.

` -- `ASCII::* $language [optional]

Language of the source string. +- `string $language [optional]

Language of the source string. (default is 'en') | ASCII::*_LANGUAGE_CODE

` - `bool $remove_unsupported_chars [optional]

Whether or not to remove the unsupported characters.

` @@ -328,26 +325,6 @@ language

` -------- -#### to_ascii_remap(string $str1, string $str2): string[] - -WARNING: This method will return broken characters and is only for special cases. - -Convert two UTF-8 encoded string to a single-byte strings suitable for -functions that need the same string length after the conversion. - -The function simply uses (and updates) a tailored dynamic encoding -(in/out map parameter) where non-ascii characters are remapped to -the range [128-255] in order of appearance. - -**Parameters:** -- `string $str1` -- `string $str2` - -**Return:** -- `string[]` - --------- - #### to_filename(string $str, bool $use_transliterate, string $fallback_char): string Convert given string to safe filename (and keep string case). @@ -379,7 +356,7 @@ also be supplied for language-specific transliteration. **Parameters:** - `string $str` - `string $separator [optional]

The string used to replace whitespace.

` -- `ASCII::* $language [optional]

Language of the source string. +- `string $language [optional]

Language of the source string. (default is 'en') | ASCII::*_LANGUAGE_CODE

` - `array $replacements [optional]

A map of replaceable strings.

` - `bool $replace_extra_symbols [optional]

Add some more replacements e.g. "£" with " diff --git a/vendor/voku/portable-ascii/build/composer.json b/vendor/voku/portable-ascii/build/composer.json new file mode 100644 index 000000000..30f30c3cc --- /dev/null +++ b/vendor/voku/portable-ascii/build/composer.json @@ -0,0 +1,5 @@ +{ + "require-dev": { + "voku/php-readme-helper": "~0.6" + } +} diff --git a/vendor/voku/portable-ascii/build/docs/base.md b/vendor/voku/portable-ascii/build/docs/base.md new file mode 100644 index 000000000..ca949d8b6 --- /dev/null +++ b/vendor/voku/portable-ascii/build/docs/base.md @@ -0,0 +1,127 @@ +[![Build Status](https://github.com/voku/portable-ascii/actions/workflows/ci.yml/badge.svg?branch=master)](https://github.com/voku/portable-ascii/actions) +[![Build status](https://ci.appveyor.com/api/projects/status/gnejjnk7qplr7f5t/branch/master?svg=true)](https://ci.appveyor.com/project/voku/portable-ascii/branch/master) +[![codecov.io](https://codecov.io/github/voku/portable-ascii/coverage.svg?branch=master)](https://codecov.io/github/voku/portable-ascii?branch=master) +[![Codacy Badge](https://api.codacy.com/project/badge/Grade/997c9bb10d1c4791967bdf2e42013e8e)](https://www.codacy.com/app/voku/portable-ascii) +[![Latest Stable Version](https://poser.pugx.org/voku/portable-ascii/v/stable)](https://packagist.org/packages/voku/portable-ascii) +[![Total Downloads](https://poser.pugx.org/voku/portable-ascii/downloads)](https://packagist.org/packages/voku/portable-ascii) +[![License](https://poser.pugx.org/voku/portable-ascii/license)](https://packagist.org/packages/voku/portable-ascii) +[![Donate to this project using Paypal](https://img.shields.io/badge/paypal-donate-yellow.svg)](https://www.paypal.me/moelleken) +[![Donate to this project using Patreon](https://img.shields.io/badge/patreon-donate-yellow.svg)](https://www.patreon.com/voku) + +# 🔡 Portable ASCII + +## Description + +It is written in PHP (PHP 7+) and can work without "mbstring", "iconv" or any other extra encoding php-extension on your server. + +The benefit of Portable ASCII is that it is easy to use, easy to bundle. + +The project based on ... ++ Sean M. Burke's work (https://metacpan.org/pod/Text::Unidecode) ++ Tomaz Solc's work (https://pypi.org/project/Unidecode/) ++ Portable UTF-8 work (https://github.com/voku/portable-utf8) ++ Daniel St. Jules's work (https://github.com/danielstjules/Stringy) ++ Johnny Broadway's work (https://github.com/jbroadway/urlify) ++ and many cherry-picks from "github"-gists and "Stack Overflow"-snippets ... + +## Index + +* [Alternative](#alternative) +* [Install](#install-portable-ascii-via-composer-require) +* [Why Portable ASCII?](#why-portable-ascii) +* [Requirements and Recommendations](#requirements-and-recommendations) +* [Usage](#usage) +* [Class methods](#class-methods) +* [Unit Test](#unit-test) +* [License and Copyright](#license-and-copyright) + +## Alternative + +If you like a more Object Oriented Way to edit strings, then you can take a look at [voku/Stringy](https://github.com/voku/Stringy), it's a fork of "danielstjules/Stringy" but it used the "Portable ASCII"-Class and some extra methods. + +```php +// Portable ASCII +use voku\helper\ASCII; +ASCII::to_transliterate('déjà σσς iıii'); // 'deja sss iiii' + +// voku/Stringy +use Stringy\Stringy as S; +$stringy = S::create('déjà σσς iıii'); +$stringy->toTransliterate(); // 'deja sss iiii' +``` + +## Install "Portable ASCII" via "composer require" +```shell +composer require voku/portable-ascii +``` + +## Why Portable ASCII?[]() +I need ASCII char handling in different classes and before I added this functions into "Portable UTF-8", +but this repo is more modular and portable, because it has no dependencies. + +## Requirements and Recommendations + +* No extensions are required to run this library. Portable ASCII only needs PCRE library that is available by default since PHP 4.2.0 and cannot be disabled since PHP 5.3.0. "\u" modifier support in PCRE for ASCII handling is not a must. +* PHP 7.0 is the minimum requirement +* PHP 8.0 is also supported + +## Usage + +Example: ASCII::to_ascii() +```php + echo ASCII::to_ascii('�Düsseldorf�', 'de'); + + // will output + // Duesseldorf + + echo ASCII::to_ascii('�Düsseldorf�', 'en'); + + // will output + // Dusseldorf +``` + +# Portable ASCII | API + +The API from the "ASCII"-Class is written as small static methods. + + +## Class methods + +%__functions_index__voku\helper\ASCII__% + +%__functions_list__voku\helper\ASCII__% + + +## Unit Test + +1) [Composer](https://getcomposer.org) is a prerequisite for running the tests. + +``` +composer install +``` + +2) The tests can be executed by running this command from the root directory: + +```bash +./vendor/bin/phpunit +``` + +### Support + +For support and donations please visit [Github](https://github.com/voku/portable-ascii/) | [Issues](https://github.com/voku/portable-ascii/issues) | [PayPal](https://paypal.me/moelleken) | [Patreon](https://www.patreon.com/voku). + +For status updates and release announcements please visit [Releases](https://github.com/voku/portable-ascii/releases) | [Twitter](https://twitter.com/suckup_de) | [Patreon](https://www.patreon.com/voku/posts). + +For professional support please contact [me](https://about.me/voku). + +### Thanks + +- Thanks to [GitHub](https://github.com) (Microsoft) for hosting the code and a good infrastructure including Issues-Managment, etc. +- Thanks to [IntelliJ](https://www.jetbrains.com) as they make the best IDEs for PHP and they gave me an open source license for PhpStorm! +- Thanks to [Travis CI](https://travis-ci.com/) for being the most awesome, easiest continous integration tool out there! +- Thanks to [StyleCI](https://styleci.io/) for the simple but powerful code style check. +- Thanks to [PHPStan](https://github.com/phpstan/phpstan) && [Psalm](https://github.com/vimeo/psalm) for really great Static analysis tools and for discover bugs in the code! + +### License and Copyright + +Released under the MIT License - see `LICENSE.txt` for details. diff --git a/vendor/voku/portable-ascii/build/generate_docs.php b/vendor/voku/portable-ascii/build/generate_docs.php new file mode 100644 index 000000000..c86f1f195 --- /dev/null +++ b/vendor/voku/portable-ascii/build/generate_docs.php @@ -0,0 +1,26 @@ +templateMethod = <<↑ +%description% + +**Parameters:** +%params% + +**Return:** +%return% + +-------- + +RAW; +$readmeText = ($readmeGenerator)->generate( + __DIR__ . '/../src/voku/helper/ASCII.php', + __DIR__ . '/docs/base.md' +); + +file_put_contents(__DIR__ . '/../README.md', $readmeText); diff --git a/vendor/voku/portable-ascii/build/generate_max_key_length.php b/vendor/voku/portable-ascii/build/generate_max_key_length.php new file mode 100644 index 000000000..743d389f5 --- /dev/null +++ b/vendor/voku/portable-ascii/build/generate_max_key_length.php @@ -0,0 +1,20 @@ +>> */ + /** + * @var array + */ static $CHARS_ARRAY = []; $cacheKey = '' . $replace_extra_symbols; @@ -343,7 +329,6 @@ final class ASCII * @return array *

An array of replacements.

* - * @phpstan-param ASCII::*_LANGUAGE_CODE $language * @phpstan-return array{orig: string[], replace: string[]}|array */ public static function charsArrayWithOneLanguage( @@ -354,7 +339,9 @@ final class ASCII $language = self::get_language($language); // init - /** @var array|array{orig: string[], replace: string[]}>> */ + /** + * @var array + */ static $CHARS_ARRAY = []; $cacheKey = '' . $replace_extra_symbols . '-' . $asOrigReplaceArray; @@ -445,7 +432,9 @@ final class ASCII bool $asOrigReplaceArray = true ): array { // init - /** @var array|array{orig: string[], replace: string[]}> */ + /** + * @var array + */ static $CHARS_ARRAY = []; $cacheKey = '' . $replace_extra_symbols . '-' . $asOrigReplaceArray; @@ -471,7 +460,6 @@ final class ASCII } } - /** @phpstan-ignore-next-line - ... error? */ $CHARS_ARRAY[$cacheKey] = \array_merge([], ...$CHARS_ARRAY[$cacheKey]); if ($asOrigReplaceArray) { @@ -590,13 +578,19 @@ final class ASCII return ''; } - /** @var array{orig: string[], replace: string[]} */ + /** + * @var array{orig: string[], replace: string[]} + */ static $MSWORD_CACHE = ['orig' => [], 'replace' => []]; if (empty($MSWORD_CACHE['orig'])) { self::prepareAsciiMaps(); - /** @var array */ + /** + * @psalm-suppress PossiblyNullArrayAccess - we use the prepare* methods here, so we don't get NULL here + * + * @var array + */ $map = self::$ASCII_MAPS[self::EXTRA_MSWORD_CHARS_LANGUAGE_CODE] ?? []; $MSWORD_CACHE = [ @@ -636,7 +630,9 @@ final class ASCII return ''; } - /** @var array> */ + /** + * @var array> + */ static $WHITESPACE_CACHE = []; $cacheKey = (int) $keepNonBreakingSpace; @@ -669,11 +665,13 @@ final class ASCII unset($WHITESPACE_CACHE[$cacheKey]["\xc2\xa0"]); } - $WHITESPACE_CACHE[$cacheKey] = array_keys($WHITESPACE_CACHE[$cacheKey]); + $WHITESPACE_CACHE[$cacheKey] = \array_keys($WHITESPACE_CACHE[$cacheKey]); } if (!$keepBidiUnicodeControls) { - /** @var array|null */ + /** + * @var array|null + */ static $BIDI_UNICODE_CONTROLS_CACHE = null; if ($BIDI_UNICODE_CONTROLS_CACHE === null) { @@ -760,6 +758,45 @@ final class ASCII return [$str1, $str2]; } + /** + * WARNING: This method will return broken characters and is only for special cases. + * + * Convert a UTF-8 encoded string to a single-byte string suitable for + * functions that need the same string length after the conversion. + * + * The function simply uses (and updates) a tailored dynamic encoding + * (in/out map parameter) where non-ascii characters are remapped to + * the range [128-255] in order of appearance. + * + * Thus, it supports up to 128 different multibyte code points max over + * the whole set of strings sharing this encoding. + * + * Source: https://github.com/KEINOS/mb_levenshtein + * + * @param string $str UTF-8 string to be converted to extended ASCII. + * @return string Mapped borken string. + */ + private static function to_ascii_remap_intern(string $str, array &$map): string + { + // find all utf-8 characters + $matches = []; + if (!\preg_match_all('/[\xC0-\xF7][\x80-\xBF]+/', $str, $matches)) { + return $str; // plain ascii string + } + + // update the encoding map with the characters not already met + $mapCount = \count($map); + foreach ($matches[0] as $mbc) { + if (!isset($map[$mbc])) { + $map[$mbc] = \chr(128 + $mapCount); + $mapCount++; + } + } + + // finally remap non-ascii characters + return \strtr($str, $map); + } + /** * Returns an ASCII version of the string. A set of non-ASCII characters are * replaced with their closest ASCII counterparts, and the rest are removed @@ -789,8 +826,6 @@ final class ASCII * * @return string *

A string that contains only ASCII characters.

- * - * @phpstan-param ASCII::*_LANGUAGE_CODE $language */ public static function to_ascii( string $str, @@ -804,12 +839,13 @@ final class ASCII return ''; } - /** @phpstan-var ASCII::*_LANGUAGE_CODE - hack for phpstan */ $language = self::get_language($language); static $EXTRA_SYMBOLS_CACHE = null; - /** @var array> */ + /** + * @var array> + */ static $REPLACE_HELPER_CACHE = []; $cacheKey = $language . '-' . $replace_extra_symbols; @@ -983,6 +1019,7 @@ final class ASCII } if ($use_transliterate) { + /** @noinspection ArgumentEqualsDefaultValueInspection */ $str = self::to_transliterate($str, null, false); } @@ -1024,9 +1061,9 @@ final class ASCII $str = (string) \preg_replace( [ - '/[^' . $fallback_char_escaped . '.\\-a-zA-Z\d\\s]/', // 1) remove un-needed chars - '/\s+/u', // 2) convert spaces to $fallback_char - '/[' . $fallback_char_escaped . ']+/u', // 3) remove double $fallback_char's + '/[^' . $fallback_char_escaped . '.\\-a-zA-Z0-9\\s]/', // 1) remove un-needed chars + '/[\\s]+/u', // 2) convert spaces to $fallback_char + '/[' . $fallback_char_escaped . ']+/u', // 3) remove double $fallback_char's ], [ '', @@ -1061,8 +1098,6 @@ final class ASCII * * @return string *

A string that has been converted to an URL slug.

- * - * @phpstan-param ASCII::*_LANGUAGE_CODE $language */ public static function to_slugify( string $str, @@ -1143,13 +1178,19 @@ final class ASCII $unknown = '?', bool $strict = false ): string { - /** @var array|null */ + /** + * @var array|null + */ static $UTF8_TO_TRANSLIT = null; - /** null|\Transliterator */ + /** + * null|\Transliterator + */ static $TRANSLITERATOR = null; - /** @var bool|null */ + /** + * @var bool|null + */ static $SUPPORT_INTL = null; if ($str === '') { @@ -1184,7 +1225,9 @@ final class ASCII ) { if (!isset($TRANSLITERATOR)) { // INFO: see "*-Latin" rules via "transliterator_list_ids()" - /** @var \Transliterator */ + /** + * @var \Transliterator + */ $TRANSLITERATOR = \transliterator_create('NFKC; [:Nonspacing Mark:] Remove; NFKC; Any-Latin; Latin-ASCII;'); } @@ -1333,50 +1376,6 @@ final class ASCII return $str_tmp; } - /** - * WARNING: This method will return broken characters and is only for special cases. - * - * Convert a UTF-8 encoded string to a single-byte string suitable for - * functions that need the same string length after the conversion. - * - * The function simply uses (and updates) a tailored dynamic encoding - * (in/out map parameter) where non-ascii characters are remapped to - * the range [128-255] in order of appearance. - * - * Thus, it supports up to 128 different multibyte code points max over - * the whole set of strings sharing this encoding. - * - * Source: https://github.com/KEINOS/mb_levenshtein - * - * @param string $str

UTF-8 string to be converted to extended ASCII.

- * @param array $map

Internal-Map of code points to ASCII characters.

- * - * @return string - *

Mapped borken string.

- * - * @phpstan-param array $map - */ - private static function to_ascii_remap_intern(string $str, array &$map): string - { - // find all utf-8 characters - $matches = []; - if (!\preg_match_all('/[\xC0-\xF7][\x80-\xBF]+/', $str, $matches)) { - return $str; // plain ascii string - } - - // update the encoding map with the characters not already met - $mapCount = \count($map); - foreach ($matches[0] as $mbc) { - if (!isset($map[$mbc])) { - $map[$mbc] = \chr(128 + $mapCount); - ++$mapCount; - } - } - - // finally, remap non-ascii characters - return \strtr($str, $map); - } - /** * Get the language from a string. * diff --git a/vendor/voku/portable-ascii/src/voku/helper/data/ascii_by_languages.php b/vendor/voku/portable-ascii/src/voku/helper/data/ascii_by_languages.php index 68c3f9d25..d51f557a1 100644 --- a/vendor/voku/portable-ascii/src/voku/helper/data/ascii_by_languages.php +++ b/vendor/voku/portable-ascii/src/voku/helper/data/ascii_by_languages.php @@ -1060,9 +1060,9 @@ return [ 'Я' => 'Ya', 'я' => 'ya', ], - // Russian - GOST 7.79-2000(B) + // Russian - Passport (2013), ICAO // -> https://en.m.wikipedia.org/wiki/Romanization_of_Russian#content-collapsible-block-1 - 'ru__gost_2000_b' => [ + 'ru__passport_2013' => [ 'А' => 'A', 'а' => 'a', 'Б' => 'B', @@ -1075,8 +1075,8 @@ return [ 'д' => 'd', 'Е' => 'E', 'е' => 'e', - 'Ё' => 'Yo', - 'ё' => 'yo', + 'Ё' => 'E', + 'ё' => 'e', 'Ж' => 'Zh', 'ж' => 'zh', 'З' => 'Z', @@ -1107,42 +1107,42 @@ return [ 'у' => 'u', 'Ф' => 'F', 'ф' => 'f', - 'Х' => 'X', - 'х' => 'x', - 'Ц' => 'Cz', - 'ц' => 'cz', + 'Х' => 'Kh', + 'х' => 'kh', + 'Ц' => 'Ts', + 'ц' => 'ts', 'Ч' => 'Ch', 'ч' => 'ch', 'ш' => 'sh', 'Ш' => 'Sh', - 'Щ' => 'Shh', - 'щ' => 'shh', - 'Ъ' => '', - 'ъ' => '', - 'Ы' => 'Y\'', - 'ы' => 'y\'', + 'Щ' => 'Shch', + 'щ' => 'shch', + 'Ъ' => 'Ie', + 'ъ' => 'ie', + 'Ы' => 'Y', + 'ы' => 'y', 'Ь' => '', 'ь' => '', - 'Э' => 'E\'', - 'э' => 'e\'', - 'Ю' => 'Yu', - 'ю' => 'yu', - 'Я' => 'Ya', - 'я' => 'ya', - 'І' => 'I', - 'і' => 'i', - 'Ѳ' => 'Fh', - 'ѳ' => 'fh', - 'Ѣ' => 'Ye', - 'ѣ' => 'ye', - 'Ѵ' => 'Yh', - 'ѵ' => 'yh', + 'Э' => 'E', + 'э' => 'e', + 'Ю' => 'Iu', + 'ю' => 'iu', + 'Я' => 'Ia', + 'я' => 'ia', + 'І' => '', + 'і' => '', + 'Ѳ' => '', + 'ѳ' => '', + 'Ѣ' => '', + 'ѣ' => '', + 'Ѵ' => '', + 'ѵ' => '', 'Є' => '', 'є' => '', 'Ѥ' => '', 'ѥ' => '', - 'Ѕ' => 'Js', - 'ѕ' => 'js', + 'Ѕ' => '', + 'ѕ' => '', 'Ꙋ' => '', 'ꙋ' => '', 'Ѡ' => '', @@ -1162,9 +1162,9 @@ return [ 'Ѱ' => '', 'ѱ' => '', ], - // Russian - Passport (2013), ICAO + // Russian - GOST 7.79-2000(B) // -> https://en.m.wikipedia.org/wiki/Romanization_of_Russian#content-collapsible-block-1 - 'ru__passport_2013' => [ + 'ru__gost_2000_b' => [ 'А' => 'A', 'а' => 'a', 'Б' => 'B', @@ -1177,8 +1177,8 @@ return [ 'д' => 'd', 'Е' => 'E', 'е' => 'e', - 'Ё' => 'E', - 'ё' => 'e', + 'Ё' => 'Yo', + 'ё' => 'yo', 'Ж' => 'Zh', 'ж' => 'zh', 'З' => 'Z', @@ -1209,42 +1209,42 @@ return [ 'у' => 'u', 'Ф' => 'F', 'ф' => 'f', - 'Х' => 'Kh', - 'х' => 'kh', - 'Ц' => 'Ts', - 'ц' => 'ts', + 'Х' => 'X', + 'х' => 'x', + 'Ц' => 'Cz', + 'ц' => 'cz', 'Ч' => 'Ch', 'ч' => 'ch', 'ш' => 'sh', 'Ш' => 'Sh', - 'Щ' => 'Shch', - 'щ' => 'shch', - 'Ъ' => 'Ie', - 'ъ' => 'ie', - 'Ы' => 'Y', - 'ы' => 'y', + 'Щ' => 'Shh', + 'щ' => 'shh', + 'Ъ' => '', + 'ъ' => '', + 'Ы' => 'Y\'', + 'ы' => 'y\'', 'Ь' => '', 'ь' => '', - 'Э' => 'E', - 'э' => 'e', - 'Ю' => 'Iu', - 'ю' => 'iu', - 'Я' => 'Ia', - 'я' => 'ia', - 'І' => '', - 'і' => '', - 'Ѳ' => '', - 'ѳ' => '', - 'Ѣ' => '', - 'ѣ' => '', - 'Ѵ' => '', - 'ѵ' => '', + 'Э' => 'E\'', + 'э' => 'e\'', + 'Ю' => 'Yu', + 'ю' => 'yu', + 'Я' => 'Ya', + 'я' => 'ya', + 'І' => 'I', + 'і' => 'i', + 'Ѳ' => 'Fh', + 'ѳ' => 'fh', + 'Ѣ' => 'Ye', + 'ѣ' => 'ye', + 'Ѵ' => 'Yh', + 'ѵ' => 'yh', 'Є' => '', 'є' => '', 'Ѥ' => '', 'ѥ' => '', - 'Ѕ' => '', - 'ѕ' => '', + 'Ѕ' => 'Js', + 'ѕ' => 'js', 'Ꙋ' => '', 'ꙋ' => '', 'Ѡ' => '', @@ -1265,32 +1265,15 @@ return [ 'ѱ' => '', ], // Ukrainian - // -> https://zakon.rada.gov.ua/laws/show/55-2010-%D0%BF?lang=en 'uk' => [ - 'Г' => 'H', - 'г' => 'h', - 'Ґ' => 'G', - 'ґ' => 'g', 'Є' => 'Ye', 'є' => 'ye', - 'И' => 'Y', - 'и' => 'y', 'І' => 'I', 'і' => 'i', 'Ї' => 'Yi', 'ї' => 'yi', - 'Й' => 'Y', - 'й' => 'y', - 'Х' => 'Kh', - 'х' => 'kh', - 'Ц' => 'Ts', - 'ц' => 'ts', - 'Ч' => 'Ch', - 'ч' => 'ch', - 'Ш' => 'Sh', - 'ш' => 'sh', - 'Щ' => 'Shch', - 'щ' => 'shch', + 'Ґ' => 'G', + 'ґ' => 'g', ], // Kazakh 'kk' => [ @@ -1619,10 +1602,10 @@ return [ 'fa' => [ 'ا' => 'a', 'ب' => 'b', - 'پ' => 'p', + 'پ' => 'b', 'ت' => 't', 'ث' => 's', - 'ج' => 'j', + 'ج' => 'g', 'چ' => 'ch', 'ح' => 'h', 'خ' => 'kh', @@ -2572,8 +2555,6 @@ return [ 'j̄' => 'j', 'J̃' => 'J', 'j̃' => 'j', - 'Й' => 'i', - 'й' => 'i', 'ĸ' => 'k', 'Ĺ' => 'L', 'Ľ' => 'L', @@ -2829,8 +2810,6 @@ return [ 'ȳ' => 'y', 'Ỹ' => 'Y', 'ỹ' => 'y', - 'Щ' => 'Shh', - 'щ' => 'shh', 'Ź' => 'Z', 'ź' => 'z', 'Z̀' => 'Z', diff --git a/vendor/voku/portable-ascii/src/voku/helper/data/ascii_extras_by_languages.php b/vendor/voku/portable-ascii/src/voku/helper/data/ascii_extras_by_languages.php index afe31ae2c..426d84a4d 100644 --- a/vendor/voku/portable-ascii/src/voku/helper/data/ascii_extras_by_languages.php +++ b/vendor/voku/portable-ascii/src/voku/helper/data/ascii_extras_by_languages.php @@ -199,8 +199,8 @@ return [ '&' => ' i ', '+' => ' plus ', ], - // Russian - GOST 7.79-2000(B) - 'ru__gost_2000_b' => [ + // Russian - Passport (2013), ICAO + 'ru__passport_2013' => [ '=' => ' ravnyj ', '%' => ' procent ', '∑' => ' summa ', @@ -210,8 +210,8 @@ return [ '&' => ' i ', '+' => ' plus ', ], - // Russian - Passport (2013), ICAO - 'ru__passport_2013' => [ + // Russian - GOST 7.79-2000(B) + 'ru__gost_2000_b' => [ '=' => ' ravnyj ', '%' => ' procent ', '∑' => ' summa ', diff --git a/vendor/voku/portable-ascii/src/voku/helper/data/ascii_language_max_key.php b/vendor/voku/portable-ascii/src/voku/helper/data/ascii_language_max_key.php index da81ae236..a6345f213 100644 --- a/vendor/voku/portable-ascii/src/voku/helper/data/ascii_language_max_key.php +++ b/vendor/voku/portable-ascii/src/voku/helper/data/ascii_language_max_key.php @@ -31,8 +31,8 @@ return [ 'fi' => 1, 'ka' => 1, 'ru' => 1, - 'ru__gost_2000_b' => 1, 'ru__passport_2013' => 1, + 'ru__gost_2000_b' => 1, 'uk' => 1, 'kk' => 1, 'cs' => 1, -- cgit v1.2.3