Page 1 of 1

start_session messing with font?

Posted: Wed Nov 21, 2007 7:25 pm
by FireElement
Alright.... basically I could not use start_session a while back and it was racking my brains for ages really could not get it so I though maybe its file save error you know sometimes u save a file and for some strange reason it dont work.... so I took everything out the file put it in new file and added start_session... guess what it worked now... I was happy but straingly some � these have been apperaing on it’s = it�s and café = caf�... I dont know if this is start_session or just because I put new text in a different file with new format although it was just a notepad... so its odd... but thats not problem just a guess but I think its just the paste over... the real problem is strangly when I add some names from a list then pass them to new file it then fecks the name up and puts weird charictors now.

ok example:

They select this: Asadābād.

They select this in a select box all is fine then I post this in to a new window showing everything selected and what not and then it turns to this: Asâdâbâd.... I dont get why it is changing this info....

Any ideas would be great thanks!

not start_session

Posted: Wed Nov 21, 2007 7:48 pm
by FireElement
its sothing to do with the post? when it gets posted back it gets changed... tis strange it worked fine before I put it in new file... tis odd...

oddd...

Posted: Wed Nov 21, 2007 7:58 pm
by FireElement
I had this on all my post I decided sinse it was select box and nothing could be changed to remove it mind you if someone injects a hack post it may mess up everything but still htmlentities( ) ... still I have remove tags etc. but I dont get why pasting it in to new file changed everything so much.

I would reall apprechate someone who could explain this to me so I can tell when work out when this will happen... thanks!!!

Posted: Wed Nov 21, 2007 8:07 pm
by FireElement
I mean I know if I past it over in to new file it could.

I just mean in general start_session would not work because of this.... I dont know what over code would be effected if this where to happen again... I think maybe the format of the file or something as I put it in notepad then it was fine but still... I really dont get it everything was the same in the other file as this one but it worked in this one. I heard about this before luckly else I would never of thought of it.

I just wondered if anyone could point out how you can tell if this is happening.. just by sticking a start_session at top of code? or is there a better more efficaint way... to be honest I just curiose as hell to know why? any ideas?

Posted: Thu Nov 22, 2007 1:29 am
by s.dot
Sounds like a character set problem. What's your character set of the document? If you're passing it to a database, what's the database collation?

Also, htmlentities() and html_entity_decode() have an optional character set parameter, which defaults to ISO-8859-1.

If you're expecting utf-8 output, make sure it all matches.

hi

Posted: Thu Nov 22, 2007 3:35 pm
by FireElement
To be honest lately I worked out that my start_session does not always work. So I copy a file I know is working. open it past the other code in save it. Then it works.... Its strange. So your probable right I dont know how to change the default chartor setting on a notepad file... am using notepad2 the free one but it does the same in notepad to so I dont really understand it???

Do you know how to change the charictor settings on a standard file?