Character Encoding in $_GET Method
By Sergey Skudaev
![]()
![]()
![]()
![]()
![]()
I passed in GET method the string '%Cables' and it was displayed as a special character and not as '%Cables'.
Then I tried all the rest characters with % to see what I get
click "Click here" link below.
|
'%A' '%B' '%D' and so on... |
'%Aa' '%Ba' '%Da' and so on... |
'%Ab' '%Bb' '%Db' and so on... |
% with one character is passed without changes:
% with 2 characters where the second is a is passed with changes. htmlspecialchars does not help!
% with 2 characters where the second is b is passed with changes:
On this page I use charset=iso-8859-1. How do you explain that?
ASCII for ord(%)=37
ASCII for ord(A)=65
ASCII for ord(a)=97
ASCII for ord(getaa)=37
ASCII for ord(%Aa)=37
Char for chr(170)= ª and it is what we get from GET method when passing %Aa.
35 + 67 + 97=199 and not 170
Char for chr(199)=Ç
Why ASCII for ord(Array(%Aa))=170 and not 199?
Please rate the tutorial
Learn SQL Programming By Examples [Kindle Edition]2.99
Learn PHP Programming by Examples [Kindle Edition] $2.99
Learn Visual Basic 6.0 [Kindle Edition] $1.99
How to Build Your Own Web Site from Scratch [Kindle Edition] $1.49
New-trip.com website source code
| Comments | |
|---|---|
- Home
- get
- Batch Files
- Java Properties
- Form Validation
- Display Image PHP
- Upload File PHP
- phpMyAdmin
- Environment Variables
- Delete Trojan horse
- PHP Code Examples
- Learn PHP
- Modeless Popup
- Read Screen Resolution
- PHP Class Example
- Page View Counter
- Display Any Table
- Read csv file
- PHP Array Functions
- Array of Fields
- GET mess
- Array of Check boxes
- PHP and MS Access
- User_Auth. Demo
- PHP App Example
- PHP + Oracle 1
- PHP + Oracle 2
- Image Collection
- Create Gallery
- Block Spam Post
- $_REQUEST,$_SESSION
- Headers Allredy Sent
- Virtual Server
- Apache:OS 10048
- Set Shopping Cart
- My Best CSS Layout
- Database Design
- Password Keeper
- MySQL and Excel
- Learn MySQL
- Learn SQL
- Learn C++
- Learn Java
- Learn Visual Basic
- Web Site Tips
- Site map
- Registration
Web programming Tips