We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hi. How to specify charset?
$ cat /tmp/index.html | htmlq 'title' <title>������</title>
$ cat /tmp/index.html | htmlq 'h1.maintitle' <h1 class="maintitle">������</h1>
The text was updated successfully, but these errors were encountered:
There's no way to do that right now as it pretty much assumes UTF-8 at the moment, but I'll have a look into it.
Sorry, something went wrong.
I would pipe it through iconv --from-code <your_charset>.
iconv --from-code <your_charset>
Example: If your file is encoded with windows-1252, you can fix it like that: cat /tmp/index.html | iconv --from-code windows-1252 | htmlq 'title'
cat /tmp/index.html | iconv --from-code windows-1252 | htmlq 'title'
Or even simpler: If you want to read from a file directly: iconv --from-code windows-1252 /tmp/index.html | htmlq 'title'
iconv --from-code windows-1252 /tmp/index.html | htmlq 'title'
No branches or pull requests
Hi. How to specify charset?
The text was updated successfully, but these errors were encountered: