CSV to HTML translation: Difference between revisions

Content added Content deleted
(C)
m (→‎{{header|C}}: remove a warning)
Line 20: Line 20:


=={{header|C}}==
=={{header|C}}==
This produces a full bare html (tidy gives two warnings) with styles embedded but not
This produces a full bare html (tidy gives 1 warning) with styles embedded but not
"inlined"; it does not escape characters that does not need to be escaped (provided
"inlined"; it does not escape characters that does not need to be escaped (provided
that the correct encoding matching the encoding of the input is given; currently
that the correct encoding matching the encoding of the input is given; currently
Line 92: Line 92:
html_min_header("utf-8", "CSV converted into HTML");
html_min_header("utf-8", "CSV converted into HTML");


printf("<table>");
printf("<table summary=\"data\">");
while( (c = getchar()) != EOF ) {
while( (c = getchar()) != EOF ) {
printf("<tr>");
printf("<tr>");