>That message indicates that you are using a very old Spreadsheet::Read, as ReadData () accepts (multiple) options since at least 2007 (that is how far my git repo goes back).

I started using Spreadsheet modules 3 or 4 months ago so they can't be old. I even performed upgrade Spreadsheet-Read within ppm and it returned Spreadsheet-Read 0.03: up to date..

Since the module refuses to accept sep parameter (semicolon as separator) I decided to write something by myself. At first I used the Data::Dumper to check what characters I read at all: it reported that characters mentioned below don't map to CP1250. I open a CSV file and use regex to perform replacements: every non-cp1250 character is replaced with unicode character. When I write data into a XLS file using Spreadsheet::WriteExcel the national characters are written correctly.

... open($fh,"Table.csv"); @Table=<$fh>; close($fh); foreach $Table(@Table){ $Table=~s/\x{00c8}/\x{010c}/g; # capital C with caron $Table=~s/\x{008a}/\x{0160}/g; # capital S with caron $Table=~s/\x{008e}/\x{017e}/g; # capital Z with caron $Table=~s/\x{008a}/\x{010d}/g; # small c with caron $Table=~s/\x{00e8}/\x{0161}/g; # small s with caron $Table=~s/\x{00e8}/\x{017f}/g; # small z with caron # follows the code parsing semicolons } # writing data into XLS file

In reply to Re: Parsing CSV table by JackVanRamars
in thread Parsing CSV table by JackVanRamars

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.