Module Kwcsv

module Kwcsv: sig .. end

Functions to Parse Comma-Separated Values (CSV)


Author(s): Keith Waclena

include Kwio.EOL
val record : ?quote:char -> ?sep:char -> ?eol:eol -> Pervasives.in_channel -> string list
Deprecated.You should use Kwcsv.fold.
record ?quote ?sep ?eol chan: read one CSV record from chan
exception CSV of int * string
Error in CSV syntax: line number * message
type eoltype = 
| LF
| CR
| CRLF
| AUTO
The type of line-endings for Kwcsv.Fold.fold input CSV files.
val string_of_eol : eoltype -> string
val eol_of_string : string -> eoltype
module type PortalineType = sig .. end
module Portaline: sig .. end
module type PF = sig .. end
module type Uutflike = sig .. end
The signature of the input structure to Kwcsv.Unicode.
module AUTO: sig .. end
Encoding structure for "automatic" Unicode decoding.
module Unicode: 
functor (Uutf : Uutflike) ->
functor (E : sig
val encoding : Uutf.decoder_encoding option
end) -> sig .. end
Functor to be applied to Uutf.
module Fold: 
functor (Portaline : PF) -> sig .. end
Folding over CSV files, possibly Unicode ones.
val fold : ?eol:eoltype ->
?q:string ->
?comma:string ->
?warn:(int -> unit) ->
('a -> int -> string list -> 'a) -> 'a -> Pervasives.in_channel -> 'a
Non-unicode-aware version of Kwcsv.Fold.fold for legacy applications.

This can fail surprisingly on Unicode CSV files that begin with a Unicode byte order mark, by corrupting the first field-name in a header line.

You should really use Uutf to make a Unicode-aware version.