Skip to content

Conversation

@jvoisin
Copy link
Collaborator

@jvoisin jvoisin commented Sep 29, 2025

  • There is no need for getEncoding to return a string instead of an array of bytes, so let's make it return a []byte instead of a string.
  • There is also no need to assign a decoder.CharsetReader when the encoding is utf-8, so let's not do that anymore.
  • Moreover, there is no reason why the function used for decoder.CharsetReader has to be defined as a lambda instead of a proper function. One might argue the other way around, but a lambda is living on the heap, while a "real" function doesn't.

@fguillot
Copy link
Member

There is also no need to assign a decoder.CharsetReader when the encoding is utf-8, so let's not do that anymore.

That one might need more testing. I don't recall all the details, but it's possible that it was done this way to handle some broken feeds (mismatch between the file encoding and the encoding declared in the XML file).

- There is no need for getEncoding to return a string instead of an array of
  bytes, so let's make it return a []byte instead of a string.
- There is no reason why the function used for decoder.CharsetReader
  has to be defined as a lambda instead of a proper function. One might argue
  the other way around, but a lambda is living on the heap, while a "real"
  function doesn't.
@jvoisin
Copy link
Collaborator Author

jvoisin commented Sep 30, 2025

Then let's not do it for now :D

@fguillot fguillot merged commit fac18d5 into miniflux:main Oct 1, 2025
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants