Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Re^3: Remove unicode "whitespace"

by Khen1950fx (Canon)
on Feb 28, 2013 at 16:11 UTC ( #1021076=note: print w/ replies, xml ) Need Help??


in reply to Re^2: Remove unicode "whitespace"
in thread Remove unicode "whitespace"

Give URI::Encode a try.

#!usr/bin/perl -l use strict; use warnings; use URI::Encode qw(uri_decode); my $encoded = 'http://commons.wikimedia.org /wiki/File:Atelerix_algirus.jpg%E2%80%8E'; print uri_decode($encoded);


Comment on Re^3: Remove unicode "whitespace"
Download Code
Re^4: Remove unicode "whitespace"
by HYanWong (Acolyte) on Mar 01, 2013 at 01:44 UTC

    Yes, I've done that. It converts the %E2%80%8E string to the unicode LRM character, which isn't printed, but is still embedded in the string, causing problems when accessing the URL again. Thanks, though.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1021076]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others musing on the Monastery: (6)
As of 2014-08-31 08:28 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The best computer themed movie is:











    Results (294 votes), past polls