wibbleypants Posted June 28, 2009 Posted June 28, 2009 After a few hours of digging around, I finally got the mysql data to remain as utf-8 when printed to the screen. Wonderful, thought I. But then I noticed that some areas, such as the login code, are getting it wrong. If I look at the code that the php produces, the html headers are set to utf-8, but accented stuff comes out as question marks. Looks really weird, as on the same screen there are characters with tildes and accents and then in these little boxes they are wrong. It's in Spanish by the way. Does anyone know how to make the entire site utf-8 compliant?
multimixer Posted June 29, 2009 Posted June 29, 2009 After a few hours of digging around, I finally got the mysql data to remain as utf-8 when printed to the screen. Wonderful, thought I. But then I noticed that some areas, such as the login code, are getting it wrong. If I look at the code that the php produces, the html headers are set to utf-8, but accented stuff comes out as question marks. Looks really weird, as on the same screen there are characters with tildes and accents and then in these little boxes they are wrong. It's in Spanish by the way. Does anyone know how to make the entire site utf-8 compliant? You need to set the encoding in your language file to be utf-8. Also to save and upload all text- language files (eg spanish.php etc) in utf-8 Can you describe the problems more in detail? Can you provide your web address? My community profile | Template system for osCommerce - New: Responsive | Feedback channel
wibbleypants Posted June 30, 2009 Author Posted June 30, 2009 You need to set the encoding in your language file to be utf-8. Also to save and upload all text- language files (eg spanish.php etc) in utf-8 Can you describe the problems more in detail? Can you provide your web address? Here's an example. There are euro signs, enye (n with tilde), accents etc. But in the one panel, the accents don't work. http://culitofresquito.es/advanced_search.php?language=es I'll go and have a look at the encoding thing that you suggested. In this day and age though, shouldn't the default be utf-8? Cheers.
multimixer Posted June 30, 2009 Posted June 30, 2009 Here's an example. There are euro signs, enye (n with tilde), accents etc. But in the one panel, the accents don't work. http://culitofresquito.es/advanced_search.php?language=es I'll go and have a look at the encoding thing that you suggested. In this day and age though, shouldn't the default be utf-8? Cheers. Find the language files where the text is defined that has the problem, save the file with an utf-8 encoding, make the corrections and upload again. My site is in utf-8 My community profile | Template system for osCommerce - New: Responsive | Feedback channel
wibbleypants Posted June 30, 2009 Author Posted June 30, 2009 Find the language files where the text is defined that has the problem, save the file with an utf-8 encoding, make the corrections and upload again. My site is in utf-8 Thanks for that. I had assumed that Gedit saved according to the local locale, which is utf-8. Now I suppose I have to load every file in the project and force them to be utf-8. Not too bad I suppose. Thanks again.
multimixer Posted June 30, 2009 Posted June 30, 2009 Now I suppose I have to load every file in the project and force them to be utf-8. Not too bad I suppose. Not every file, just the language files 1) catalog/includes/languages/yourlanguage/ allfiles + yourlanguage.php 2) catalog/admin/includes/languages/yourlanguage/allfiles + yourlanguage.php Do not forget the files in the subfolders My community profile | Template system for osCommerce - New: Responsive | Feedback channel
wibbleypants Posted June 30, 2009 Author Posted June 30, 2009 Not every file, just the language files 1) catalog/includes/languages/yourlanguage/ allfiles + yourlanguage.php 2) catalog/admin/includes/languages/yourlanguage/allfiles + yourlanguage.php Do not forget the files in the subfolders Thanks. I did that already and found there's a lot of missing accents in the spanish. And a lot of literal translations. Also, in the modules:payment directory, not much has been translated. I guess someone got bored ;-) Also, there was a mixture of charsets, well, most files were in utf-8 already, but half a dozen or so were in 8859. Also noticed that the help files haven't been translated. I don't suppose you know off-hand who would be responsible for the spanish translations? I'm sure I can look it up if not. One other thing, if I want to use the euro sign on the english version, that should just mean changing one file, no? Well, maybe I'll just change english.php to utf-8 and see what happens...
wibbleypants Posted June 30, 2009 Author Posted June 30, 2009 Thanks. I did that already and found there's a lot of missing accents in the spanish. And a lot of literal translations. Also, in the modules:payment directory, not much has been translated. I guess someone got bored ;-) Also, there was a mixture of charsets, well, most files were in utf-8 already, but half a dozen or so were in 8859. Also noticed that the help files haven't been translated. I don't suppose you know off-hand who would be responsible for the spanish translations? I'm sure I can look it up if not. One other thing, if I want to use the euro sign on the english version, that should just mean changing one file, no? Well, maybe I'll just change english.php to utf-8 and see what happens... Right. I found a spanish language pack for 2.2 by someone called dfssis, but all in 8859. So what I'll do is take that and "convert" it to utf-8 and could I then make it available as a utf-8 version of dfssis' contribution? I know it won't be very different, but just would save someone the same work all over.
multimixer Posted July 1, 2009 Posted July 1, 2009 You can turn all english fles to be in utf-8 too, no problem. As about translating, you can do everything and then upload it as a translation contribution. How is everything working now? My community profile | Template system for osCommerce - New: Responsive | Feedback channel
wibbleypants Posted July 1, 2009 Author Posted July 1, 2009 You can turn all english fles to be in utf-8 too, no problem. As about translating, you can do everything and then upload it as a translation contribution. How is everything working now? As is - not brilliant. The package I downloaded is missing some defines and has some that the existing doesn't have. I'm going to have to diff the whole lot and put together a package that fits the version of oscommerce that I'm using (2.2 RC2). trouble is, I can't really test all code paths. Does anyone have a test rig for following all code paths?
multimixer Posted July 2, 2009 Posted July 2, 2009 You can use a file comparison program to compare the english and spanish language files 1) On folder level, to see if spanish files are missing 2) On file level, to see if definition lines are missing Then just copy the english into spanish and translate it your self My community profile | Template system for osCommerce - New: Responsive | Feedback channel
IndiaStarker Posted July 4, 2009 Posted July 4, 2009 Does anyone know how to make the entire site utf-8 compliant? I just went throught the exercise of making the French community's version utf-8 compliant. What I did is here : http://www.oscommerce-fr.info/forum/index....st&p=325204 and available here : http://addons.oscommerce.com/info/6857 Note that it is our French version, currently at v2.2 RC1 I am not an expert but hope to have found and used the correct incantations. -i. *** Je suis plus souvent sur le forum français *** ms2fr, Header Tags 2.5.5b, Order logging before payment, Better PayPal Description perso, Free shipping per product, Must agree to terms, Country State Selector, World Zones, Visible countries, Store Pick Up, several shipping modules, Personal Invoice Number, 'On the Fly' Auto Thumbnailer using GD Library, More_Pics_6 for 2.2 ms2, Ultimate SEO URLs 2-2.1d/e,Virement Bancaire, Estimated Shipping 1.5, xml_guide, SP+,Step By Step 1.8, Order Editor 2.6.3, Google Analytics, Dynamic Sitemap 2.0, OSC-Expeditor, Recover Cart Sales, Links Manager 1.15 local : linux 2.6 Fedora Core 3, server : APACHE 2.0.54, MySQL 4.1.18, php : 4.4.0 (on strike refuse to update) remote : IcoOpenBSD 4.x, server : IcodiaSecureHttpd, MySQL 4.1.24, php : 4.4.9 You never get a second chance to make a first impression.
wibbleypants Posted July 7, 2009 Author Posted July 7, 2009 You can turn all english fles to be in utf-8 too, no problem. As about translating, you can do everything and then upload it as a translation contribution. Right. I now have it all in utf-8 and have removed all the "´e;" type stuff. Also added some bits that were missing. There were also some errors in the Spanish version like: "If you use PayPal you get a bonus" rather than the English "If you use PayPal *OsCommerce* gets a bonus". Anyway, it all seems to work with v2.2 RC2a, although there's lots of superfluous stuff which may or may not be a problem. Perhaps somebody from the project might like to take a look and remove the rubbish unused macros? I might add, that I haven't botherd with the admin stuff, as todo el mundo entiende el inglés. So do I just zip it up and someone here can do something with it? There's version control info at the top of all these files, which should surely be updated? I don't have a clue. So, who wants this stuff?
Recommended Posts
Archived
This topic is now archived and is closed to further replies.