abdus Posted May 26, 2008 Share Posted May 26, 2008 hi , My scripts are using cp1256 (windows-1256) encoding. but the apache dafault encoding is iso-8859-1. so it causes some problems especially in inserting/querying database how can I change the apache-encoding in run-time (a PHP function or something) or from cpanel? my host (shared webhost) told me to to use 'runtime encoder' what is this and how can I use it I hope it's the right place for this problem thank you. Link to comment https://forums.phpfreaks.com/topic/107329-encoding-proplem/ Share on other sites More sharing options...
abdus Posted May 27, 2008 Author Share Posted May 27, 2008 hmmm, no reply How about .htacess ? Link to comment https://forums.phpfreaks.com/topic/107329-encoding-proplem/#findComment-550657 Share on other sites More sharing options...
effigy Posted May 27, 2008 Share Posted May 27, 2008 What encoding is the database using? Is it given the proper instructions? Link to comment https://forums.phpfreaks.com/topic/107329-encoding-proplem/#findComment-550772 Share on other sites More sharing options...
abdus Posted May 28, 2008 Author Share Posted May 28, 2008 thanks for help yes .. but I wonder how to set the server encoding when Im not connecting to mysql I wnat to apply something like 'SET NAMES windows-1256' when I am not connecting to db and is it impotrant in the first place to change the apache encoding to be as that of the scripts i.e. (would it be ok in serching, regexp and strings-processing when the apache charset is different) I hope its clear, thank you effigy again Link to comment https://forums.phpfreaks.com/topic/107329-encoding-proplem/#findComment-551478 Share on other sites More sharing options...
abdus Posted June 1, 2008 Author Share Posted June 1, 2008 ? ? ? Link to comment https://forums.phpfreaks.com/topic/107329-encoding-proplem/#findComment-554974 Share on other sites More sharing options...
effigy Posted June 2, 2008 Share Posted June 2, 2008 Shouldn't your meta tag override Apache's default? Does cp1256 display properly? Link to comment https://forums.phpfreaks.com/topic/107329-encoding-proplem/#findComment-555569 Share on other sites More sharing options...
haku Posted June 2, 2008 Share Posted June 2, 2008 I believe that the meta tags do not overpower the apache settings, as the apache settings are set with the http headers before the meta tag is ever sent to the browser. To change your default charset, you need to edit your php.ini file, and set the default_charset = windows-1256 Link to comment https://forums.phpfreaks.com/topic/107329-encoding-proplem/#findComment-555583 Share on other sites More sharing options...
effigy Posted June 2, 2008 Share Posted June 2, 2008 This appears to be the case based on AddDefaultCharset. How about using this is your .htaccess? Link to comment https://forums.phpfreaks.com/topic/107329-encoding-proplem/#findComment-555617 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.