That said, you can actually alter the defaults, all of which are
documented here:
http://api.querypath.org/docs/group__querypath__core.html#gaef0367b722980142efd304a5ed41fb15
So, for example, you might want to try something like this:
$options = array(
'convert_from_encoding' => 'utf-8',
);
$QP = htmlqp($html, NULL, $options);
The source code for the htmlqp() function might be useful to look at,
too. It is very short. It basically creates an $options array and then
calls qp(). So you can see exactly which options are passed to it.
Sometimes tinkering with the data using mb_convert_encoding() and
family will help you find out if there is an encoding error in the
document. However, since those are the functions QueryPath uses
already, they may not help in this case.
http://br.php.net/manual/en/function.mb-convert-encoding.php
Matt
> --
> You received this message because you are subscribed to the Google Groups "support-querypath" group.
> To post to this group, send email to support-...@googlegroups.com.
> To unsubscribe from this group, send email to support-queryp...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/support-querypath?hl=en.
>
>
If you do figure out what the problem is, please let me know. I'd
really like to get QueryPath to the point where nobody ever had to
worry about trivialities like what character encoding was used.
Matt
Matt
$dom = \HTML5::loadHTML($html);
$qp = qp($dom);
To unsubscribe from this group and stop receiving emails from it, send an email to support-queryp...@googlegroups.com.
Visit this group at http://groups.google.com/group/support-querypath.
For more options, visit https://groups.google.com/groups/opt_out.