Jump to content

Character encoding issues

Man In Tan

Recommended Posts

I'm trying to build a substitution cipher class, but character encodings are getting in the way. I want to make use of all one bit UTF-8 characters, as well as the regular space character. However, when I send certain characters to PHP through this form, they get interpreted as multi-byte characters. For example, if I send character 255 (ÿ), it gets interpreted as the two characters "ÿ". Any idea haw to fix this?

<form action="filemanager.php?file=%2F0gb.us%2Ftest.php" method="post" accept-charset="UTF-8"><input type="hidden" name="function" value="file_put_contents" /><textarea rows="64" cols="64" name="file"></textarea><input type="submit" value="file_put_contents()" /></form>

EDIT: Never mind. I didn't understand how UTF-8 actually works. There are no characters at the code points 128 through 255. Characters requiring more than seven bits to express seem be in the two byte range. My bad.

Edited by Man In Tan
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Create New...