Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

utf-8 and notepad!


morpion

Recommended Posts

Hello,

I ran into a stumbling block with my server after having a character set problem.

I had information displayed from the database that was incorrectly showing french accents, the site is hosted on my own dedicated server and i spent some time reconfiguring everything so the utf-8 was used as default language.

Finally I was still getting character errors from information coming from mysql and opened index.php with notepad to change its default character set to utf-8 which seems to have corrected my errors, I saved the dcument using 'all files' and utf-8...page displayed correctly but i got a message "

Warning: session_start() [function.session-start]: Cannot send session cookie - headers already sent by (output started at /www/indiceplus/www/index.php:1) in /www/indiceplus/www/includes/functions/sessions.php on line 97

 

Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /www/indiceplus/www/index.php:1) in /www/indiceplus/www/includes/functions/sessions.php on line 97"

displayed on each page and I really cant suss out why seeing all i did was change the character setting.

Is their anyone who can advise me why!

and secondly is their a function to switch mysql dbase character set to utf-8 because i have the impression when oscommerce created the database it used the latin1 charachter set.

 

Really appreciate your help and my excuses for being a n00b as far as oscommerce is concerned!

You can see the site at www.indiceplus.net/index.php if that helps.

Link to comment
Share on other sites

Well, as I commented in the PM i sent you, i was having the same problem. After some time of troubleshooting i got the fix. Apperantly when opening ascii encoded file, to converted to UTF, you must make sure you are not including BOM. so when you first open the ascii file, make sure you save it as "UTF-8 NO BOM" at least for the inital conversion. Try it and that should fix your problem. If that works, than after you convert it once without BOM, than you can start encoding with BOM if you like, since now BOM will be placed corrently.

 

This is because if you convert an ascii file to UTF-8 the BOMs may no be place correctly. but BOMs will be place correctly on a UTF-8 file that doesnt already have them.

 

Steps.

 

1. Open ascii file

2. Encode/Save as "UTF-8 NO BOM"

3. Upload and make usre everything works.

4. Now you can save as UTF-8 with or without BOM (because now BOMs will be properly placed)

 

BOM = byte order marker.

 

Let me know if it works.

 

Thanks!

Jorge

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...