Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix C with Cedilla GSM code point #318

Merged
merged 3 commits into from
Jun 9, 2022
Merged

Fix C with Cedilla GSM code point #318

merged 3 commits into from
Jun 9, 2022

Conversation

Starfox64
Copy link
Contributor

Description

EncodingDetector incorrectly uses the lowercase version of Latin Small Letter C with Cedilla (U+00E7) instead of Latin Capital Letter C with Cedilla (U+00C7).

See https://en.wikipedia.org/wiki/GSM_03.38#GSM_7-bit_default_alphabet_and_extension_table_of_3GPP_TS_23.038_/_GSM_03.38

Motivation and Context

Prevents sending characters that require unicode encoding to be sent as text, causing invalid characters to be displayed in an SMS.

How Has This Been Tested?

Manual call to EncodingDetector::requiresUnicodeEncoding() after correcting the list.

Example Output or Screenshots (if appropriate):

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

EncodingDetector incorrectly uses the lowercase version of `Latin Small Letter C with Cedilla (U+00E7)` instead of `Latin Capital Letter C with Cedilla (U+00C7)`.

See https://en.wikipedia.org/wiki/GSM_03.38#GSM_7-bit_default_alphabet_and_extension_table_of_3GPP_TS_23.038_/_GSM_03.38
@Starfox64
Copy link
Contributor Author

Hello, anything blocking this PR?

@SecondeJK
Copy link
Contributor

I'm working on a fairly major release, so I'm aiming to incorporate this into it. As usual with libraries like this, time is always short

@SecondeJK SecondeJK self-requested a review June 1, 2022 11:01
@SecondeJK SecondeJK self-assigned this Jun 1, 2022
@SecondeJK SecondeJK added the bug label Jun 1, 2022
@SecondeJK
Copy link
Contributor

I've enabled the test runner - can you please fix the tests accordingly?

Copy link
Contributor

@SecondeJK SecondeJK left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The test suite is still failing - can you update the tests to pass and run locally before pushing? Thanks

@Starfox64 Starfox64 requested a review from SecondeJK June 8, 2022 11:02
@Starfox64
Copy link
Contributor Author

Fixed, tests are passing locally.

@codecov-commenter
Copy link

Codecov Report

Merging #318 (f3ad749) into main (3d0c1f3) will not change coverage.
The diff coverage is 100.00%.

@@            Coverage Diff            @@
##               main     #318   +/-   ##
=========================================
  Coverage     82.37%   82.37%           
  Complexity     1928     1928           
=========================================
  Files           157      157           
  Lines          4918     4918           
=========================================
  Hits           4051     4051           
  Misses          867      867           
Impacted Files Coverage Δ
src/Message/EncodingDetector.php 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 3d0c1f3...f3ad749. Read the comment docs.

@SecondeJK SecondeJK merged commit a031483 into Vonage:main Jun 9, 2022
@SecondeJK
Copy link
Contributor

Awesome, thanks for this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants