Skip to content

Detecting sms charset according to gsm charset gsm03.38

Notifications You must be signed in to change notification settings

u-mulder/sms-charset-detector

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

29 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

sms-charset-detector

GitHub Workflow Status GitHub release (latest SemVer)

Detecting sms charset using gsm charset.

sms-charset-detector helps you to detect whether your sms content contains gsm charset symbols only or not.

Installation

Install package with Composer:

> composer require um/sms-charset-detector

Usage

Simple usage:

use Um\CharsetDetector\BasicCharsetDetector;

$detector = new BasicCharsetDetector();
$message = 'Some message to be sent over sms';

$encoding = $detector->detectCharset($message);
echo $encoding;	// outputs either 'gsm' or 'ucs'

// simple check if charset is 'gsm'
$messageHasGsmCharset = $detector->isGsmCharset($message);
var_dump($messageHasGsmCharset);   // outputs either `true` or `false`

About

Detecting sms charset according to gsm charset gsm03.38

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages