6.0.0-beta1
▾
Tasks
New Task
Search
Photos
Wiki
▾
Tickets
New Ticket
Search
dev.horde.org
Toggle Alerts Log
Help
10/31/25
H
istory
A
ttachments
C
omment
W
atch
Download
Comment on [#9201] Check for ISO-8859-1/Windows-1252 improper charset labeling
*
Your Email Address
*
Spam protection
Enter the letters below:
.__ .__ . .. .. . [__)[ __|_/ | ||\ | | \[_./| \|__|| \|
Comment
>> My guess is that there is something weird going on with the DOM >> encoding/loading. It seems to be working perfect on my system - but >> that could be because I am using en_US.UTF-8. It might not be >> working properly on, e.g., de or fr locales. >> >> I would suggest playing around with charsets in Horde_Domhtml >> (located in the horde/Util package). > > For reference... when I view the HTML part in a new window, > Horde_Domhtml is called once. The initial loadHTML() call fails as > the encoding is not auto-determined. It then moves into the forced > loadHTML() call after converting to UTF-8. The charset passed into > the constructor is UTF-8. > > Pseudocode: > > public function __construct($text, 'UTF-8) > { > $doc = new DOMDocument(); > $doc->loadHTML($text); > > // $doc->encoding is empty > $this->encoding = $doc->encoding; > > if (!is_null($charset)) { > if (!$doc->encoding) { > $doc->loadHTML('<?xml encoding="UTF-8">' . > Horde_String::convertCharset($text, $charset, 'UTF-8')); > $this->encoding = 'UTF-8'; > } > } > }
Attachment
Watch this ticket
N
ew Ticket
M
y Tickets
S
earch
Q
uery Builder
R
eports
Saved Queries
Open Bugs
Bugs waiting for Feedback
Open Bugs in Releases
Open Enhancements
Enhancements waiting for Feedback
Bugs with Patches
Enhancements with Patches
Release Showstoppers
Stalled Tickets
New Tickets
Horde 5 Showstoppers