This recipe helps you decode common HTML/XML entities (like &
, <
, etc.) in a specific CSV column, replacing them with their respective characters.
Usage:
Decode entities in a column
Use the following command to decode HTML/XML entities and save the output:
qsv luau map --map DecodedColumn decode_entities.lua filename.csv -o output_filename.csv
- Replace
decode_entities.lua
with the filename of this Lua script. - Replace
filename.csv
with the input CSV file.
Preview the decoded content
To preview the decoded column without saving the file, use this command:
qsv luau map --remap DecodedColumn decode_entities.lua filename.csv | qsv table
Notes:
- This script decodes common entities like
&
,<
,>
,"
, and'
.
Additional Links:
Learn more about Lua command here
More Articles on qsv Recipes
Was this article helpful?
That’s Great!
Thank you for your feedback
Sorry! We couldn't be helpful
Thank you for your feedback
Feedback sent
We appreciate your effort and will try to fix the article