Skip to content

Commit 32faf96

Browse files
committed
Merge pull request #2550 from deanc/domcrawler-charset-doc
Added a note to the dom-crawler docs about character sets
2 parents d875dc0 + 0ac02e6 commit 32faf96

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

components/dom_crawler.rst

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -160,6 +160,12 @@ The crawler supports multiple ways of adding the content::
160160
$crawler->add('<html><body /></html>');
161161
$crawler->add('<root><node /></root>');
162162

163+
.. note::
164+
165+
When dealing with other character sets than ISO-8859-1, always add HTML content
166+
using the addHTMLContent method where you can specify the second parameter
167+
to be your target character set.
168+
163169
As the Crawler's implementation is based on the DOM extension, it is also able
164170
to interact with native :phpclass:`DOMDocument`, :phpclass:`DOMNodeList`
165171
and :phpclass:`DOMNode` objects:

0 commit comments

Comments
 (0)