Suggestion: use Charsets instead of strings in SAVFileReader
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 1.1k
- Forks
- 564
- Avg merge
- 2d 2h
- Merged PRs (30d)
- 29
Description
Overview of the Suggestion
SAVFileReader defines a defaultCharset variable as a String and uses it to convert between strings and bytes.
@stevenwinship suggested in a comment on #10077 to use StandardCharsets in those locations, but because there is some interaction with the API and UI, I wasn't sure that a find-and-replace would work. At some point, I expect that the name of a Charset is exchanged between UI and backend as a string, which would need a look-up to convert it into a Charset.
What kind of user is the suggestion intended for?
(Example users roles: API User, Curator, Depositor, Guest, Superuser, Sysadmin)
Developers, QA
What inspired this idea?
https://github.com/IQSS/dataverse/pull/10077#discussion_r1662954203
What existing behavior do you want changed?
Nothing in how Dataverse works should change.
Any brand new behavior do you want to add to Dataverse?
No.
Any open or closed issues related to this suggestion?
#10076
Are you thinking about creating a pull request for this issue?
No. I don't know how the current UI influences what kind of solution is needed and I have no experience with SAV files. The SAVFileReader is quite a big class with details that I don't understand.
I fully understand if this issue is closed as not planned, but I promised to open it, so here it is.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reading SAVFileReader and tracing how its defaultCharset value crosses the backend and UI/API boundary, especially the locations related to #10077 and #10076. Confirm how charset names are exchanged before deciding on the change; done means charset handling uses Charset values without changing existing Dataverse behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- backend
- Issue type
- Refactor
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100