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

Change default RE2 encoding to Latin1 #461

Merged
merged 9 commits into from
Nov 19, 2024
Merged

Change default RE2 encoding to Latin1 #461

merged 9 commits into from
Nov 19, 2024

Conversation

koniksedy
Copy link
Collaborator

@koniksedy koniksedy commented Nov 15, 2024

This PR:

  • Changes the default RE2 encoding from UTF-8 to Latin1, as Latin1 uses direct encoding on 8 bits. UTF-8 encoding can be enabled through a parameter.
  • Adds an UTF-8 encoder and decoder for Word.
  • Adds an UTF-8 decoder for Nfa.
  • Adds corresponding tests.

@koniksedy koniksedy requested review from jurajsic and Adda0 November 15, 2024 23:42
Copy link

codecov bot commented Nov 18, 2024

Codecov Report

Attention: Patch coverage is 87.62887% with 12 lines in your changes missing coverage. Please review.

Project coverage is 73.67%. Comparing base (01b560e) to head (a45f104).
Report is 117 commits behind head on devel.

Files with missing lines Patch % Lines
src/nfa/nfa.cc 85.71% 2 Missing and 6 partials ⚠️
src/alphabet.cc 88.88% 2 Missing and 2 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##            devel     #461      +/-   ##
==========================================
+ Coverage   72.15%   73.67%   +1.51%     
==========================================
  Files          30       30              
  Lines        3714     4251     +537     
  Branches      847      968     +121     
==========================================
+ Hits         2680     3132     +452     
- Misses        738      771      +33     
- Partials      296      348      +52     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Collaborator

@Adda0 Adda0 left a comment

Choose a reason for hiding this comment

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

I will believe you that the decoding bit shifts and other bit operations are correct. Other than that, it seems alright. I will merge the code now, and we can test the issues waiting for this PR.

@Adda0 Adda0 merged commit 6d87b8b into devel Nov 19, 2024
18 checks passed
@Adda0 Adda0 deleted the utf-8 branch November 19, 2024 10:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants