You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
fix: decode the feed as utf-8 when no charset is declared - #37
When the response does not declare a charset, EntityUtils.toString decoded the feed as ISO-8859-1, which garbled non-ASCII characters (e.g. "Add‑ons" was displayed as "Addâ□□ons"). Decode it as UTF-8 instead, the default encoding for XML. A charset declared in the response is still honored.
Feeds that declare no charset will now decode as UTF-8, which fixes garbled non-ASCII text. Feeds that declare a charset are still decoded with it. The change is small, and no merge-blocking risk was found.
Pre-merge checks: 4
Check name
Status
Explanation
Description Check
Check skipped - CodeRabbit’s high-level summary is enabled.
Title check
The title names the main change: the feed is now decoded as UTF-8 when the response declares no charset. The raw summary confirms RssItems.obtainRss now decodes the entity as UTF-8 explicitly, and the…
Linked Issues check
Issue #35 requires that a feed without a charset parameter be decoded as UTF-8, and that a declared charset be honored. At the reviewed head, RssItems.obtainRss (src/main/java/com/flowingcode/vaadin/a…
Out of Scope Changes check
The whole-PR change set touches only RssItems.java. The changes are the UTF-8 default in the EntityUtils.toString call and the StandardCharsets import. Both directly implement issue #35. No unrelated …
Full details: Title check
Explanation
The title names the main change: the feed is now decoded as UTF-8 when the response declares no charset. The raw summary confirms RssItems.obtainRss now decodes the entity as UTF-8 explicitly, and the objectives describe the same fallback behavior, with declared charsets still honored. The title uses the conventional fix: prefix and is specific enough for a teammate scanning history.
Full details: Linked Issues check
Explanation
Issue #35 requires that a feed without a charset parameter be decoded as UTF-8, and that a declared charset be honored. At the reviewed head, RssItems.obtainRss (src/main/java/com/flowingcode/vaadin/addons/rssitems/RssItems.java) calls EntityUtils.toString(entity, StandardCharsets.UTF_8). This is the exact form the issue proposes. The StandardCharsets import is present. In HttpCore, the two-argument EntityUtils.toString uses the charset from the Content-Type header when one is declared. It uses the supplied default only when no charset is declared. The PR description states the same behavior. The change meets both parts of the objective. No automated test was added for the decoding behavior. The issue does not request a test, so this does not fail the objective. The base revision of the file could not be read through the diff tool. The base state is inferred from the summary (+2/-1 lines) and the reviewed head file.
Full details: Out of Scope Changes check
Explanation
The whole-PR change set touches only RssItems.java. The changes are the UTF-8 default in the EntityUtils.toString call and the StandardCharsets import. Both directly implement issue #35. No unrelated changes were found in the reviewed summary or the reviewed head file.
Finishing Touches
Generate unit tests (beta)
Commit to this branch
Create a new PR
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.
Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
When the response does not declare a charset,
EntityUtils.toStringdecoded the feed as ISO-8859-1, which garbled non-ASCII characters (e.g. "Add‑ons" was displayed as "Addâ□□ons"). Decode it as UTF-8 instead, the default encoding for XML. A charset declared in the response is still honored.Close #35
Summary by CodeRabbit