as, newlines, or quotes).
A record is a list of fields separated by commas,
ending with a newline or the string end (-1).
</p>

<p>
As it is,
the previous pattern returns each field as a separated result.
If we add a table capture in the definition of <code>record</code>,
the pattern will return instead a single table
containing all fields:
</p>
<pre>
local record = lpeg.Ct(field * (',' * field)^0) * (lpeg.P'\n' + -1)
</pre>


<h3>UTF-8 and Latin 1</h3>
<p>
It is not difficult to use LPeg to convert a strin