Skip to content

Decode Central Bank rates with the declared XML encoding - #229

Merged
iamwavecut merged 1 commit into
mainfrom
fix/cbr-xml-encoding
Oct 10, 2026
Merged

iamwavecut merged 1 commit into
mainfrom
fix/cbr-xml-encoding

Conversation

@iamwavecut

Copy link
Copy Markdown
Owner

The currency tool rejected the Central Bank XML response as invalid UTF-8. The live endpoint declares Windows-1251 in both its HTTP header and XML declaration.

Deserialize the original bytes through the existing XML parser with its encoding feature enabled. This preserves source dates, values, caching and validation. No new crate version is added. The HTTP fixture now supports binary response bodies.

Validation: a Windows-1251 HTTP regression failed with the original decoder, then passed; existing UTF-8 XML and currency cross-pair tests passed; cargo fmt --all; cargo test --workspace --all-targets (2471 passed, 10 ignored); cargo clippy --workspace --all-targets -- -D warnings.

@github-actions

Copy link
Copy Markdown
Messages
📖 Danger checked 3 changed file(s).

Generated by 🚫 dangerJS against 1283431

@iamwavecut
iamwavecut merged commit 05fc142 into main Oct 10, 2026
12 checks passed
@iamwavecut
iamwavecut deleted the fix/cbr-xml-encoding branch October 10, 2026 13:01
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