mirror of
https://github.com/benbusby/whoogle-search.git
synced 2026-04-25 20:25:51 +03:00
[GH-ISSUE #267] [BUG] Text encoding problem in Simplified Chinese interface #186
Labels
No labels
Fixed (Pending PR Merge)
Stale
bug
enhancement
enhancement
good first issue
help wanted
keep-open
needs more info
pull-request
question
theme
unfortunate
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/whoogle-search#186
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @ghost on GitHub (Apr 6, 2021).
Original GitHub issue: https://github.com/benbusby/whoogle-search/issues/267
Describe the bug
Japanese word showed in search result was wrongly encoded.
To Reproduce
Steps to reproduce the behavior:
Interface LanguagetoSimplified Chineseあなたの名前Deployment Method
runexecutableVersion of Whoogle Search
Desktop (please complete the following information):
Smartphone (please complete the following information):
Additional context
@ghost commented on GitHub (Apr 6, 2021):
It seems any phrase containing the
ーis messed@jacr13 commented on GitHub (Apr 7, 2021):
After investigating a bit, the problem is the random user-agent generated by whoogle, more precisely the "Mozilla" part.
Google seems to return the response with "charset=GB2312" when the Mozilla word is replaced by a random one and "charset=UTF-8" when Mozilla is provided.
To solve the problem a quick fix is to replace this line :
github.com/benbusby/whoogle-search@d450cb1d61/app/request.py (L52)by:
mozilla = "Mozilla"@benbusby commented on GitHub (Apr 8, 2021):
Weird. Thanks @jacr13 for looking into that, I'll push a hotfix soon.
@ghost commented on GitHub (Apr 8, 2021):
Screenshot was deleted for it's exposing my private instance url