Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

Re: string conversion problem

by Your Mother (Chancellor)
on Mar 07, 2013 at 06:07 UTC ( #1022151=note: print w/replies, xml ) Need Help??


in reply to string conversion problem

You tried what now? :P

perl -MURI::Escape -le 'print uri_unescape("%E4%BA%8E%E6%96%AF%E5%B1%88%E8%BE%BE%E5%B0%94")'
于斯屈达尔

Replies are listed 'Best First'.
Re^2: string conversion problem
by Anonymous Monk on Mar 07, 2013 at 07:27 UTC

    What the.....

    That piece of Chinese charater string you get is absolutely right. But I simply CANNOT get the same result. The exact same code produces "浜庢柉灞堣揪灏" on my computer. Is there some configuration stuff that I'm missing? BTW I'm coding on a winxp machine with activePerl.

    Also, the solution that Khen1950fx presents probably should produce the correct result but it just does not work for me either.

      Try this...? This is along the lines aitap wrote about.

      perl -CSD -MEncode -MURI::Escape -le 'print decode "UTF-8", uri_unescape("%E4%BA%8E%E6%96%AF%E5%B1%88%E8%BE%BE%E5%B0%94")'

      You might need to reverse the quotes for your box.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1022151]
help
Chatterbox?
[LanX]: 20 years ago traders were complaining about the latency of the trading system...
[ambrus]: I'm currently in the process of rewriting my proof of concept programs. They sort of developped organically as I was experimenting, so now I've got an ugly mess of multiple programs and one-liners held together by nothing. I'll have to rewrite them to som
[ambrus]: ething that's both cleanly organized and mostly automated.
LanX in train, bad connection
[Corion]: ambrus: Yeah - we're in that situation too, except that there is no time to do the reorganizing :-/
[LanX]: ... so my boss started a project with the newest sun servers and invited the traders to come on weekend to test it... and they were so pleased, that they forced him to keep it in production...
[ambrus]: Corion: sure, this is the long-term plan. The short term is that I have to run this ungodly mess to get results from the new input data today.
[Corion]: ambrus: Most of our "automation" is tied to process exit codes and a shell pipeline :-\
[LanX]: ... a week later they realized that one of the databases - which recorded how much the other banks due to this bank - was not correctly plugged

How do I use this? | Other CB clients
Other Users?
Others scrutinizing the Monastery: (16)
As of 2017-03-29 11:49 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Should Pluto Get Its Planethood Back?



    Results (350 votes). Check out past polls.