The Cache: Technology Expert's Forum
 
*
Welcome, Guest. Please login or register. September 22, 2019, 05:46:51 PM

Login with username, password and session length


Pages: [1]
  Print  
Author Topic: URL Friendly Character  (Read 6274 times)
unknown_zero
n00b
*
Offline Offline

Posts: 2


View Profile
« on: October 27, 2008, 12:48:50 AM »

hi, I'm trying to automate Google Translate using Mechanize,
the problem is when I'm trying to translate from French to English a () character will be translated to %E0 (?) character in the URL
how to correctly convert that foreign character?  Grin
Logged

No links in signatures please
dirk
Global Moderator
Expert
*****
Offline Offline

Posts: 416


View Profile
« Reply #1 on: October 27, 2008, 05:54:48 PM »

Welcome unknown_zero!

You could have a look here:

http://search.cpan.org/~dankogai/Encode-2.25/Encode.pm

Maybe the module is helpful.
Logged
perkiset
Olde World Hacker
Administrator
Lifer
*****
Offline Offline

Posts: 10096



View Profile
« Reply #2 on: October 27, 2008, 06:06:19 PM »

Welcome to the Cache, UZ. Sorry I can't help, I'm a perltard.
Logged

It is now believed, that after having lived in one compound with 3 wives and never leaving the house for 5 years, Bin Laden called the U.S. Navy Seals himself.
Bompa
Administrator
Lifer
*****
Offline Offline

Posts: 564


Where does this show?


View Profile
« Reply #3 on: October 27, 2008, 09:20:12 PM »

hi, I'm trying to automate Google Translate using Mechanize,
the problem is when I'm trying to translate from French to English a () character will be translated to %E0 (?) character in the URL
how to correctly convert that foreign character?  Grin

But is Google or mech giving you the %E0 ?

Can you check with just your browser?  If it's Google, you're dead.

From what I see, %E0 is a form feed. that is not a good sign.

Logged

"The most beautiful and profound emotion we can experience is the sensation of the mystical..." - Albert Einstein
unknown_zero
n00b
*
Offline Offline

Posts: 2


View Profile
« Reply #4 on: October 28, 2008, 05:17:25 AM »

thanks, it fixed now
it seems the problem is in the uri_escape function that I use,
when I change it to CGI::escape it works fine
Logged

No links in signatures please
Pages: [1]
  Print  
 
Jump to:  

Perkiset's Place Home   Best of The Cache   phpMyIDE: MySQL Stored Procedures, Functions & Triggers
Politics @ Perkiset's   Pinkhat's Perspective   
cache
mart
coder
programmers
ajax
php
javascript
Powered by MySQL Powered by PHP Powered by SMF 1.1.2 | SMF © 2006-2007, Simple Machines LLC
Seo4Smf v0.2 © Webmaster's Talks


Valid XHTML 1.0! Valid CSS!