chore: rewrite for pure utf-8 content handling#511
Merged
tobiasehlert merged 5 commits intomainfrom Sep 23, 2025
Merged
Conversation
|
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR converts content handling from ISO-8859-1 to pure UTF-8 by removing encoding conversion logic and updating test data charset declarations.
- Removes ISO-8859-1 to UTF-8 encoding conversion in the data collector
- Updates HTML test files to declare UTF-8 charset instead of ISO-8859-1
- Comments out specific test assertions for news-related endpoints
Reviewed Changes
Copilot reviewed 73 out of 75 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| src/webserver.go | Removes encoding conversion pipeline, directly uses response body |
| src/webserver_test.go | Comments out test assertions for tibiaNewslist and tibiaNews functions |
| src/static/testdata/worlds/*.html | Updates charset declarations from ISO-8859-1 to UTF-8 |
Comments suppressed due to low confidence (1)
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.



This pull request refactors the handling of character encoding throughout the codebase and updates test data files to use UTF-8 encoding. It also removes obsolete encoding conversion functions and updates related tests to reflect current world data. These changes help standardize encoding, simplify code, and ensure better compatibility with international characters.
Encoding and test data standardization:
src/static/testdata/characters/and similar directories to use UTF-8 encoding in their<meta>tags and addedlang="en"to the<html>tag, replacing the previous ISO-8859-1 encoding. [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12] [13] [14] [15]Codebase simplification:
TibiaDataConvertEncodingtoISO88591andTibiaDataConvertEncodingtoUTF8functions, and their dependencies oncharmapandio, as all test data and processing now use UTF-8 exclusively. [1] [2] [3]Testing improvements:
TestWorldAnticatosrc/TibiaWorldsWorld_test.goto verify correct parsing of a world with special characters in player names, ensuring UTF-8 compatibility.TestWorldPremiainsrc/TibiaWorldsWorld_test.goto reflect current world status, online player count, and quest titles, aligning test expectations with updated data.