Client Side Things
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Codewalkers ForumsOther TechnologiesClient Side Things

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Codewalkers Forums Sponsor:
  #1  
Old November 24th, 2003, 01:59 PM
Anonymous Anonymous is offline
Registered User
Codewalkers God 35th Plane (22000 - 22499 posts)
 
Join Date: Apr 2007
Posts: 22,309 Anonymous User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 24
characters problem with meta tag

Hi,

I'm writing a php script. (but i think my problem is nothing to do with php, that's why i posted it here.)
My code:
php Code:
Original - php Code
  1.  
  2.  
  3. echo "You will be redirected in 3 seconds.";
  4. print "<meta http-equiv='Refresh' CONTENT='3;URL=test.php?sel=$_POST[name]'>";
  5. //  print "<A HREF='test.php?sel=$_POST[name]'>$_POST[name]</A>"; 
  6.  

The problem is that if the value of the passed variable($_POST[name]) contains accentuated letters( for example:é) then it will not pass correctly. This happens when i use the meta tag redirecting, but if i use the commented line(simple link, see code) then it works!

more specific:
$_POST[name] = "Péter"

Then if I use the meta tag redirecting and print out the value of $_GET['name'] in test.php i got the following: P�ter
and in the url:
http://127.0.0.1/test.php?name=P%EF%BF%BDter

but if i use the another way(simple link), then it prints out Péter and in the url:
http://127.0.0.1/test.php?name=P%E9ter

And another thing, this happens when i use Opera browser. I tryed out the meta tag version with IE5.5 and it worked!

Can someone tell me what should i do to get this working under Opera? Perhaps i should set some preferences(witch i tryed) but found nothing useful. Or i have to put some other meta tags in my page to get accentuated letters working?
Sorry for the long post, any help appreciated. Thanks in advance.

Reply With Quote
  #2  
Old November 24th, 2003, 02:03 PM
Anonymous Anonymous is offline
Registered User
Codewalkers God 35th Plane (22000 - 22499 posts)
 
Join Date: Apr 2007
Posts: 22,309 Anonymous User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 24
RE: characters problem with meta tag

Sorry, i mistyped: Of course i write out $_GET['sel'] in test.php.

Reply With Quote
  #3  
Old November 25th, 2003, 06:11 PM
zombie zombie is offline
Codewalkers Intermediate (1500 - 1999 posts)
 
Join Date: Apr 2007
Location: serbia
Posts: 1,876 zombie User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 3
RE: characters problem with meta tag

you might get it to work with urlencode($_GET['name']), but i need to know what encoding you use for your pages to help you better? UTF-8 or other?

Reply With Quote
  #4  
Old November 26th, 2003, 09:10 AM
Anonymous Anonymous is offline
Registered User
Codewalkers God 35th Plane (22000 - 22499 posts)
 
Join Date: Apr 2007
Posts: 22,309 Anonymous User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 24
RE: characters problem with meta tag

I'm a newbie in this characters thing. You are thinking about(for example) the
<meta http-equiv='charset' CONTENT='ISO-8859-2'>
lines. I didn't write this kind of lines in my pages. What do you suggest, which character set should i use if i want to get accentuated letters work?

Reply With Quote
  #5  
Old November 27th, 2003, 03:13 AM
zombie zombie is offline
Codewalkers Intermediate (1500 - 1999 posts)
 
Join Date: Apr 2007
Location: serbia
Posts: 1,876 zombie User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 3
RE: characters problem with meta tag

try

<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">

with urlencode() function.


(btw, no need to use this charset with other pages. only for this redirecting one)

Reply With Quote
  #6  
Old November 27th, 2003, 01:25 PM
Anonymous Anonymous is offline
Registered User
Codewalkers God 35th Plane (22000 - 22499 posts)
 
Join Date: Apr 2007
Posts: 22,309 Anonymous User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 24
RE: characters problem with meta tag

A very big Thank You Zombie!)

I got it working with the urlencode() function and i don't need to insert that charset line. In the first time i misunderstood that function, but now it's all clear. Thanks again!!!)

Reply With Quote
Reply

Viewing: Codewalkers ForumsOther TechnologiesClient Side Things > characters problem with meta tag


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 2 hosted by Hostway
Stay green...Green IT