Skip to content

fix: accept UTF-8 signatures in CSV and TSV input - #103

Open
Shubham-Padkonde wants to merge 1 commit into
dbpedia:mainfrom
Shubham-Padkonde:fix/tabular-utf8-bom
Open

Shubham-Padkonde wants to merge 1 commit into
dbpedia:mainfrom
Shubham-Padkonde:fix/tabular-utf8-bom

Conversation

@Shubham-Padkonde

Copy link
Copy Markdown

Description

UTF-8 CSV and TSV files with a byte-order mark retain that mark in their first column name. For a resource header, CSV-to-RDF conversion consequently rejects the input as missing its required column.

Read tabular input with utf-8-sig so an optional leading signature is removed. Ordinary UTF-8 input and U+FEFF characters within cell values remain intact.

Type of change

  • Bug fix
  • New feature
  • Breaking change
  • Documentation update
  • Housekeeping

Validation

The regression covers CSV and TSV, both with and without a UTF-8 signature. It checks the parsed rows and the resulting RDF triples, including a Unicode value containing an interior U+FEFF. The two signature cases fail before the change; all four pass afterward.

  • python -m pytest -q: 187 passed, 3 skipped (Windows, Python 3.13).
  • ruff check .: passed with Ruff 0.5.5.
  • git diff --check: passed.

Checklist

  • Code follows the project's Ruff configuration.
  • I have performed a self-review of my own code.
  • Added tests that reproduce the failure and exercise the fix.
  • New and existing unit tests pass locally.

@coderabbitai

coderabbitai Bot commented Oct 26, 2026

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 56 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 18bf73ce-81df-4f0e-94a3-5da2432bb232
Commits

Reviewing files that changed from the base of the PR and between 3701c23 and 63d4240.

Files selected for processing: 2
  • databusclient/filehandling/format.py
  • tests/test_tabular_bom.py
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

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.

1 participant