A PHP library with all unicode blocks. For every block the library contains the English and the German name as well as the start and end value and the regex pattern to match the block.
composer require zepi/unicode
To use the library, use the following options:
<?php
require_once(__DIR__ . '/vendor/autoload.php');
use zepi\Unicode\UnicodeIndex;
$unicodeIndex = new UnicodeIndex();
// Get all blocks
var_dump($unicodeIndex->getIndex());
// Get a block by key
var_dump($unicodeIndex->getBlockByKey('BasicLatin'));
<?php
require_once(__DIR__ . '/vendor/autoload.php');
use zepi\Unicode\Block\BasicLatinBlock;
$basicLatinBlock = new BasicLatinBlock();
var_dump($basicLatinBlock);
MIT (see LICENSE)
Copyright 2022 Matthias Zobrist