PHPackages                             inok/detect-cyr-encoding - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. inok/detect-cyr-encoding

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

inok/detect-cyr-encoding
========================

Detect Text Cyrillic Encoding

1.0.0(3y ago)052MITPHPPHP &gt;=7.0 || ~8.0.0

Since May 15Pushed 3y ago1 watchersCompare

[ Source](https://github.com/nchizhov/detect-cyr-encoding)[ Packagist](https://packagist.org/packages/inok/detect-cyr-encoding)[ Docs](http://blog.kgd.in)[ RSS](/packages/inok-detect-cyr-encoding/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (1)DependenciesVersions (2)Used By (0)

Detect Text Cyrillic Encoding
-----------------------------

[](#detect-text-cyrillic-encoding)

[![License](https://camo.githubusercontent.com/794d1c86116aa2562ab09a2a6b13c1c92bcf06a32596b83910389e90118012e8/68747470733a2f2f706f7365722e707567782e6f72672f696e6f6b2f6465746563742d6379722d656e636f64696e672f6c6963656e7365)](https://packagist.org/packages/inok/detect-cyr-encoding)[![License](https://camo.githubusercontent.com/c4b94427289bbb3cb9a2b169e9c8a0bde7ad4f27265ba16e63fbcb45fee991d7/68747470733a2f2f706f7365722e707567782e6f72672f696e6f6b2f6465746563742d6379722d656e636f64696e672f762f737461626c65)](https://packagist.org/packages/inok/detect-cyr-encoding)[![License](https://camo.githubusercontent.com/295101d5d2a8252826a64b30c538122c89b5ee811b4567bf2fd6c0d40137816b/68747470733a2f2f706f7365722e707567782e6f72672f696e6f6b2f6465746563742d6379722d656e636f64696e672f642f6d6f6e74686c79)](https://packagist.org/packages/inok/detect-cyr-encoding)

This package for detecting cyrillic encoding of source text (Supports encodings: **'UTF-8', 'cp866', 'cp1251'**)

### Installation

[](#installation)

You can install this package by using [Composer](http://getcomposer.org), running this command:

```
composer require inok/detect-cyr-encoding
```

Link to Packagist:

### Usage

[](#usage)

```
$detector = new \Inok\detectCyrEncoding\Detector();
$encoding = $detector->detect($text);
```

where:

- **$text** - Text for detect encoding

return:

- **$encoding** - string with one of detected encodings: UTF-8, cp866, cp1251

### License

[](#license)

This package is released under the **MIT license**.

Copyright (c) 2023 Chizhov Nikolay

###  Health Score

23

—

LowBetter than 27% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community4

Small or concentrated contributor base

Maturity49

Maturing project, gaining track record

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

1098d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/ce0f496c0c04c90c29675b08f834ad58707bc8e3498e1693e198e23e0b3e5871?d=identicon)[nchizhov](/maintainers/nchizhov)

---

Tags

encodingdetectcyrillic

### Embed Badge

![Health badge](/badges/inok-detect-cyr-encoding/health.svg)

```
[![Health](https://phpackages.com/badges/inok-detect-cyr-encoding/health.svg)](https://phpackages.com/packages/inok-detect-cyr-encoding)
```

###  Alternatives

[paragonie/constant_time_encoding

Constant-time Implementations of RFC 4648 Encoding (Base-64, Base-32, Base-16)

901329.7M148](/packages/paragonie-constant-time-encoding)[hisorange/browser-detect

Browser &amp; Mobile detection package for Laravel.

1.1k10.1M50](/packages/hisorange-browser-detect)[patrickschur/language-detection

A language detection library for PHP. Detects the language from a given text string.

8513.2M18](/packages/patrickschur-language-detection)[jaybizzle/laravel-crawler-detect

A Laravel package to detect web crawlers via the user agent

3232.6M17](/packages/jaybizzle-laravel-crawler-detect)[onnov/detect-encoding

Text encoding definition class instead of mb\_detect\_encoding. Defines: utf-8, windows-1251, koi8-r, iso-8859-5, ibm866, .....

223.8M8](/packages/onnov-detect-encoding)[paquettg/string-encode

Facilitating the process of altering string encoding in PHP.

698.7M43](/packages/paquettg-string-encode)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
