Git Product home page Git Product logo

sms-counter-php's People

Contributors

juliangut avatar luishdez avatar markitosgv avatar z38 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

sms-counter-php's Issues

HHVM travis build failing

composer install is failing on HHVM travis build

Fatal error: Uncaught Error: Keyword __HALT_COMPILER must be written in lowercase in /home/travis/.phpenv/versions/hhvm-stable/bin/composer:27

Composer dropped support for HHVM: composer/composer#8127

Missing characters

Characters รฉ and ร‰ are missing from the LATIN 1 charset.

Thanks for the awesome library!

Possible bug in utf8ToUnicode()

Hi,

It seems that the utf8ToUnicode () function returns an unexpected result when there are more special utf8 characters in the string such as emojii.

Considering the following character: "๐Ÿ˜Ž" ( https://emojipedia.org/smiling-face-with-sunglasses/ )

When the function is called, passing a string containing a single emojii, it returns an array with a single integer value 2008.

When instead the string contains 2 emojii, the function returns an array containing 3 integer values: 2008, 944, 2008

code snipped

immagine

output

immagine

Bug counting messages with emoji

It seems now that emoji are counted as 1 character when they occupy the space of 2 characters when encoded with UTF-16.

Given this statement:

$message = "๐Ÿ˜Ž๐Ÿ˜Ž๐Ÿ˜Ž๐Ÿ˜Ž๐Ÿ˜Ž๐Ÿ˜Ž๐Ÿ˜Ž๐Ÿ˜Ž๐Ÿ˜Ž๐Ÿ˜Ž๐Ÿ˜Ž๐Ÿ˜Ž๐Ÿ˜Ž๐Ÿ˜Ž๐Ÿ˜Ž๐Ÿ˜Ž๐Ÿ˜Ž๐Ÿ˜Ž๐Ÿ˜Ž๐Ÿ˜Ž๐Ÿ˜Ž๐Ÿ˜Ž๐Ÿ˜Ž๐Ÿ˜Ž๐Ÿ˜Ž๐Ÿ˜Ž๐Ÿ˜Ž๐Ÿ˜Ž๐Ÿ˜Ž๐Ÿ˜Ž๐Ÿ˜Ž๐Ÿ˜Ž๐Ÿ˜Ž๐Ÿ˜Ž๐Ÿ˜Ž๐Ÿ˜Ž๐Ÿ˜Ž๐Ÿ˜Ž๐Ÿ˜Ž๐Ÿ˜Ž๐Ÿ˜Ž๐Ÿ˜Ž๐Ÿ˜Ž๐Ÿ˜Ž๐Ÿ˜Ž๐Ÿ˜Ž๐Ÿ˜Ž๐Ÿ˜Ž๐Ÿ˜Ž๐Ÿ˜Ž๐Ÿ˜Ž๐Ÿ˜Ž๐Ÿ˜Ž๐Ÿ˜Ž๐Ÿ˜Ž๐Ÿ˜Ž๐Ÿ˜Ž๐Ÿ˜Ž๐Ÿ˜Ž๐Ÿ˜Ž๐Ÿ˜Ž๐Ÿ˜Ž๐Ÿ˜Ž๐Ÿ˜Ž๐Ÿ˜Ž๐Ÿ˜Ž๐Ÿ˜Ž๐Ÿ˜Ž๐Ÿ˜Ž๐Ÿ˜Ž";
var_dump((new SMSCounter())->count($message));

This used to output:

{
  +"encoding": "UTF16"
  +"length": 139
  +"per_message": 67
  +"remaining": 62
  +"messages": 3
}

but now outputs:

{
  +"encoding": "UTF16"
  +"length": 70
  +"per_message": 70
  +"remaining": 0
  +"messages": 1
}

It would seem from my limited understanding of SMS character encoding that the former is correct.

Related to #10 and introduced by #14

Version 0.* and Semantic Versioning

When using this library with a dependency constraint in composer such as ^0.4.1, newer versions such as 0.5.0 do not match this constraint (unlike a constraint such as ^1.4.1 and a version such as 1.5.1 which would match).

This is due to this rule in the semantic versioning spec:

Major version zero (0.y.z) is for initial development. Anything may change at any time. The public API should not be considered stable.

So the question I have to the maintainer is: would you consider the public API of this library stable? Does the choice of the 0.* version numbers fit with the rule above? Or can the rule be safely ignored here?

Please confirm if wooblecode was renamed to instasent ?

Hi,
I am the original maintainer of sms-counter-php. After maintaining for some years, I had updated the readme in my repo with a cross link to the repo github.com/wooblecode/sms-counter-php.

The repo is now redirecting to this repo. Please confirm the change so that I can update the original repo with the meta link to this updated repo.

Regards,

Counting Difference in Ajax Call and Form Submission

I am facing a very strange issue. When I pass the text via an ajax call, I get the count of the message as 1 sms but when the same text is submitted via a form, I get it as 2 sms count, The total length in first case it says 158 characters and on form submission it says 162 characters, The text is the following. I am really stuck in this and the whole system is stuck due to this. Any help is much appreciated

EID-UL-ADHA SPECIAL
FLAT 10% OFF on stitching and fabrics.
Place your order today at your nearest Dandy and get it before Eid.
03111132639
www.dandydesigns.pk

Sorry for the link the comment but thats part of the sms I am having problem with

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.