Skip to content

Handle Unicode CSV delimiters - #13

Merged
mmalcek merged 1 commit into
mmalcek:mainfrom
bensynapse:fix-unicode-csv-delimiter
Oct 12, 2026
Merged

mmalcek merged 1 commit into
mmalcek:mainfrom
bensynapse:fix-unicode-csv-delimiter

Conversation

@bensynapse

Copy link
Copy Markdown
Contributor

I run Live Tennis API.

With -d '§', name§surname currently becomes one column. prepareDelimiter reads the first UTF-8 byte, which selects a different character.

Decode the first rune so Unicode delimiters split columns correctly. The default comma, ASCII delimiters and hexadecimal inputs keep their behavior.

Added 12 parsing cases for ASCII and Unicode delimiters, quoted fields and empty values. Five fail against current main.

On Go 1.23.4, go test -v -cover ./... and go test -race -v -cover ./... pass with 81.8% coverage. go build -v ./... and go vet ./... also pass. Eight compiled CLI cases pass, including file input with a BOM and file output.

@mmalcek mmalcek left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

Thanks for the fix

@mmalcek
mmalcek merged commit edbfbac into mmalcek:main Oct 12, 2026
2 checks passed
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.

2 participants