Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
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
Replies are listed 'Best First'.
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 romping around the Monastery: (4)
As of 2015-07-28 06:58 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (252 votes), past polls