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: Handle U+2028 character in dataLine parsing #38

Open
FelippeNO opened this issue Jan 19, 2025 · 1 comment
Open

Fix: Handle U+2028 character in dataLine parsing #38

FelippeNO opened this issue Jan 19, 2025 · 1 comment

Comments

@FelippeNO
Copy link

Problem

The lineRegex.firstMatch(dataLine)! statement fails when the input contains the U+2028 character (Line Separator). This issue occurs because:

  1. The input is not sanitized.
  2. The exception is not caught, so the onError callback is never invoked.

Solution

  • Sanitized the input to remove the U+2028 character before parsing.
  • Wrapped the parsing block in a try-catch to ensure errors are properly handled.

Image
Image

@renannery
Copy link

Amazing catch!

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

No branches or pull requests

2 participants