msaspence Posted November 11, 2007 Share Posted November 11, 2007 im having a real problem with character encoding and php i aware that php has some problems with character encoding but i dont really understand them whats got me even more stumped is that when i was developing the same thing on my pc i never had this problem im now on a mac whats more the problem only seems to happen when using the rewrite rule in the htaccess? basically if i have an file index.html and it is <?php echo "£"; ?> it echos a £ sign fine if however i use an htaccess file to redirect any request to another file lets say invoke.html and it has the same thing it outputs £ i know for this example i should just echo £ but this isnt exactly what im trying to do this is just the simpliest example of the problem what im actually doing is fopen fread a file then using strpos to find any £ symbols the £ symbols in the file are just £ symbols if i echo the read file contents they output as just £ symbols however if i put "£" in as the needle for strpos it goes in as £ and therefore doesnt find it in the haystack any ideas on why this is or how i might fix it would be really appreciated Quote Link to comment Share on other sites More sharing options...
MadTechie Posted November 11, 2007 Share Posted November 11, 2007 this is an encoding issule, use UTF-8, this may help http://www.w3.org/International/questions/qa-htaccess-charset Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.