diff --git a/SMSCounter.php b/SMSCounter.php index 983bec7..11cee5a 100644 --- a/SMSCounter.php +++ b/SMSCounter.php @@ -182,6 +182,10 @@ public function getAddedPortugueseGsm7bitExMap() */ public function count($text) { + //Implemented normalization of newline characters in the SMS count function to ensure consistent and accurate SMS length calculations across different platforms. + //This fix standardizes the handling of newlines by converting `\r\n` to `\n`, addressing the issue where SMS parts were calculated differently due to varying newline character lengths in different operating systems. + + $text = str_replace("\r\n", "\n", $message) return $this->doCount($text, false); }