in reply to SOLVED: Storing UTF-8 data into database from scraped web page
Hello nysus,
Try to Encode the data before you store them. It should work. Sample of code:
#!/usr/bin/env perl use Encode; use strict; use warnings; print encode_utf8("<p>What\x{2019}s up with the water ??</p>"), $/; __END__ $ perl test.pl <p>What’s up with the water ??</p>
Hope this helps, BR
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Storing UTF-8 data into database from scraped web page
by nysus (Parson) on Jun 14, 2018 at 20:46 UTC | |
by thanos1983 (Parson) on Jun 15, 2018 at 09:57 UTC | |
|
Re^2: Storing UTF-8 data into database from scraped web page
by nysus (Parson) on Jun 14, 2018 at 19:03 UTC | |
by thanos1983 (Parson) on Jun 14, 2018 at 20:58 UTC |