Hi Monks ,
Am in a bit of confusion here with no clue on what is causing this exception. I have written a perl script which extracts rows of data from SharePoint list using SOAP::Lite Module.
The extraction works properly , but in certain scenarios the special character symbols are converted when i open the CSV file which is created by Perl script.
Part of Code snippet which extract the mentioned columns and write it into a CSV file. I have already parsing them as UTF-8
my $element_rowlimit = name( 'rowLimit' => 10000 );
#print $soap->serializer->envelope( 'method' => 'GetListItems', $eleme
+nt_listname, $element_query, $element_rowlimit );
my $som = $soap->GetListItems( $element_listname, $element_query, $ele
+ment_rowlimit );
my @results = $som->dataof('//GetListItemsResult/listitems/data/row');
my $oc = Text::CSV->new({sep_char => ',', eol => $/ })
or die Text::CSV->error_diag();
open my $of, '>', 'Load_Data.csv' or die $!;
binmode $of, ':utf8';
chomp @results;
foreach my $data (@results) {
my $item = $data->attr;
chomp $item;
$oc->print($of,[@$item{qw( ows_Job_x0020_ID ows_Justific
+ation )}]);
}
close $of;
Lets say the Value of Justification column in Sharepoint is as : "RMS Roughness (Rq) is ~3.7Å for both wafers."
But, when extracted by perl , the comment is changed to following : "RMS Roughness (Rq) is ~3.7Ã for both wafers."
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: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.