parsing - Read Arabic lettering in html into csv using Perl -


i working html has arabic lettering in it. trying parse lettering csv file opens default in excel.

i using perl script parse lettering out thought using

use feature 'unicode_strings';

in perl allow csv store arabic lettering not.

is there way round this?

use autodie qw(:all); use web::query qw(wq); use text::csv_xs qw();  $csv = text::csv_xs->new({binary => 1})     or die "cannot use csv: ".text::csv_xs->error_diag; open $fh, '>:encoding(utf-8)', 'm.csv'; $csv->print($fh, [wq(     '<!doctype html>     <html><head><title></title></head><body>&#x645;&#x643;&#x629; &#x623;&#x648;     &#x645;&#x643;&#x629; &#x627;&#x644;&#x645;&#x643;&#x631;&#x645;&#x629;     &#x647;&#x64a; &#x645;&#x62f;&#x64a;&#x646;&#x629;     &#x645;&#x642;&#x62f;&#x633;&#x629; &#x644;&#x62f;&#x649;     &#x627;&#x644;&#x645;&#x633;&#x644;&#x645;&#x64a;&#x646;&#x60c;     &#x628;&#x647;&#x627; &#x627;&#x644;&#x645;&#x633;&#x62c;&#x62f;     &#x627;&#x644;&#x62d;&#x631;&#x627;&#x645;&#x60c;     &#x648;&#x627;&#x644;&#x643;&#x639;&#x628;&#x629; &#x627;&#x644;&#x62a;&#x64a;     &#x62a;&#x639;&#x62f; &#x642;&#x628;&#x644;&#x629;     &#x627;&#x644;&#x645;&#x633;&#x644;&#x645;&#x64a;&#x646; &#x641;&#x64a;     &#x635;&#x644;&#x627;&#x62a;&#x647;&#x645;.</body></html>' )->find('body')->text]); close $fh; 

Comments

Popular posts from this blog

objective c - Change font of selected text in UITextView -

php - Accessing POST data in Facebook cavas app -

c# - Getting control value when switching a view as part of a multiview -