1st Post php and ¾ signs etc
Posted: Wed Mar 11, 2009 6:26 am
Sorry I am not going to be able to give too many versions etc as its been a while since I set up my server.
I run Fedora Core 6 or 7 on a server and at the time of building it installed teh relevant php and mysql which has all been working fine and very reliable.
The initial database that I created opened htm pages and stripped out the required text to import in to the database. This all worked fine at the time and even now the data is displayed absolutely fine.
It has now come time to update the database with new records and amend some old ones. As I had over 2500 web pages to look at I created a script (AutoIT) that would open the required pages and save them to my PC. I then used some VBA in Excel to extract the information so that I could use that to compare and decide which records needed to be added and which needed to be amended and in some cases marked as deleted. The VBA then created a text file to create my own version of a csv file using the ^ as a delimiter as this is one character not used in any of the data.
All this has worked fine so far until I write my import program in php. Having said that just trying to get the ¾ to display in the php page is still an issue. So I have opened the file in php as a csv file max line size 1500 as lines can be up to about 1000 characters and used the ^ as a delimiter. The 39 fields all get read in to the array as expected each time. However if I display that data where there should be a ¾ or similar fractions and even £ they are not displayed.
Not sure what is causing this but I'm now looking at file types etc like unicode or ANSI but as I know nothing about these and probably barking up the wrong tree hopefully heres where someone comes along and points me in the right direction.
Oh and a simple php report can pull the existing data from the db and display the ¾ etc so its not db, server or the pc that has the issue so it has to be the code or file type.
Thanks for any help in advance.
Langy
I run Fedora Core 6 or 7 on a server and at the time of building it installed teh relevant php and mysql which has all been working fine and very reliable.
The initial database that I created opened htm pages and stripped out the required text to import in to the database. This all worked fine at the time and even now the data is displayed absolutely fine.
It has now come time to update the database with new records and amend some old ones. As I had over 2500 web pages to look at I created a script (AutoIT) that would open the required pages and save them to my PC. I then used some VBA in Excel to extract the information so that I could use that to compare and decide which records needed to be added and which needed to be amended and in some cases marked as deleted. The VBA then created a text file to create my own version of a csv file using the ^ as a delimiter as this is one character not used in any of the data.
All this has worked fine so far until I write my import program in php. Having said that just trying to get the ¾ to display in the php page is still an issue. So I have opened the file in php as a csv file max line size 1500 as lines can be up to about 1000 characters and used the ^ as a delimiter. The 39 fields all get read in to the array as expected each time. However if I display that data where there should be a ¾ or similar fractions and even £ they are not displayed.
Not sure what is causing this but I'm now looking at file types etc like unicode or ANSI but as I know nothing about these and probably barking up the wrong tree hopefully heres where someone comes along and points me in the right direction.
Oh and a simple php report can pull the existing data from the db and display the ¾ etc so its not db, server or the pc that has the issue so it has to be the code or file type.
Thanks for any help in advance.
Langy