qwertyjjj Posted September 3, 2011 Share Posted September 3, 2011 I created a file called french.php but when the page loads all the text with accents is converted: eg Bonjour invité! Désirez-vous vous identifier ou créer un compte? I saved the file as UTF8. Any ideas on what I have to change? Quote Link to comment Share on other sites More sharing options...
Jan Zonjee Posted September 3, 2011 Share Posted September 3, 2011 For starters the pages you link to are not accessible: 403 Forbidden You are not allowed to access this page. Possible problems: [*]Missing index file [*]Misconfigured mod_rewrite settings in .htaccess [*]Authentication Failure [*]Incorrect file or folder permissions Quote Link to comment Share on other sites More sharing options...
MrPhil Posted September 4, 2011 Share Posted September 4, 2011 What character encoding is specified? If your accented characters are UTF-8, does the language file specify that? Your text looks like UTF-8 displayed as a single byte encoding such as ISO-8859-1 (Latin-1). When you "created" french.php, did you convert something like english.php? The default for English is Latin-1. If you think you have it specifying UTF-8, see what the page claims the encoding is. If it says UTF-8, do any other UTF-8 pages come through OK? Some servers are set to override encodings and use only Latin-1. If your page is UTF-8 encoding, I take it that your database is also UTF-8? Exactly what version of osC are you running? Quote Link to comment Share on other sites More sharing options...
Bjoie Posted September 4, 2011 Share Posted September 4, 2011 Bonjour qwerty, In order to make all accents show correctly on your website you have to use " Bonjour invitée" et non "Bonjour invitée". You just have to replace all words containing "é" in you french.php file and others with "é". It's the only way it'll work correctly on your website. Hope that helps Quote Link to comment Share on other sites More sharing options...
qwertyjjj Posted September 4, 2011 Author Share Posted September 4, 2011 For starters the pages you link to are not accessible: 403 Forbidden You are not allowed to access this page. Possible problems: [*]Missing index file [*]Misconfigured mod_rewrite settings in .htaccess [*]Authentication Failure [*]Incorrect file or folder permissions T hat's because only I can access it from my IP at present preventing the site from being live. Quote Link to comment Share on other sites More sharing options...
qwertyjjj Posted September 4, 2011 Author Share Posted September 4, 2011 What character encoding is specified? If your accented characters are UTF-8, does the language file specify that? Your text looks like UTF-8 displayed as a single byte encoding such as ISO-8859-1 (Latin-1). When you "created" french.php, did you convert something like english.php? The default for English is Latin-1. If you think you have it specifying UTF-8, see what the page claims the encoding is. If it says UTF-8, do any other UTF-8 pages come through OK? Some servers are set to override encodings and use only Latin-1. If your page is UTF-8 encoding, I take it that your database is also UTF-8? Exactly what version of osC are you running? I simply copied english.php and renamed it french.php but when I edited it, I made sure it saved at UTF8.I am ru nning 2.2 RC1The char acter encoding of FF says Western 8859. As soon as I change it to UTF8 it works correctly but how do I make the page run as UTF8? Quote Link to comment Share on other sites More sharing options...
Jan Zonjee Posted September 4, 2011 Share Posted September 4, 2011 What is wrong with saving your french.php as iso-8859-1 (Latin 1)? As Phil explained using UTF-8 for your site needs a number of things: the webserver should use UTF-8 instead of iso-8859-1, your settings should say it is UTF-8 (probably not so important) and very important your database in this case should be set to utf-8 also as well as the content of the database should be converted to UTF-8. All in all it looks like the easiest solution in this case is to save your french.php as iso-8859-1 and forget about UTF-8. Quote Link to comment Share on other sites More sharing options...
qwertyjjj Posted September 4, 2011 Author Share Posted September 4, 2011 That seems to work - thanks. Can I delete the english.php and english folder and simply have francais.php and francais folder only? This site does not need other languages. Also, there seems to be a 2nd english.php file in /cart/includes - does that need to be changed also? It seems strange to have 2 of them when everything could be put into one language file. Quote Link to comment Share on other sites More sharing options...
qwertyjjj Posted September 4, 2011 Author Share Posted September 4, 2011 I am now trying to save a file with an escape character in ISO8859 but it will not save. Any ideas why? It says the document has characters that are not compatible. It cuts the text off at the first \ <?php /* $Id: $ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright (c) 2007 osCommerce Released under the GNU General Public License */ define('TEXT_MAIN', ' <hr> <b style="color: rgb(7,75,138);"> Proxyplayer vous offre l\’accès à des serveurs proxy et réseau privé virtuel (VPN) pour une grande variété d’utilisations telles que :<br /> <br /> - accès sécurisé<br /> - navigation sur internet<br /> - navigation anonyme<br /> - visualisation de vidéos<br /> Quote Link to comment Share on other sites More sharing options...
qwertyjjj Posted September 4, 2011 Author Share Posted September 4, 2011 (edited) above should be a sbelow, without the html chars Edit: it keeps chagning them to html chars <?php /* $Id: $ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright (c) 2007 osCommerce Released under the GNU General Public License */ define('TEXT_MAIN', ' <hr> <b style="color: rgb(7,75,138);"> Proxy vous offre l\’accès à des serveurs proxy et réseau privé virtuel (VPN) pour une grande variété d’utilisations telles que :<br /> <br /> - accès sécurisé<br /> - navigation sur internet<br /> - navigation anonyme<br /> - visualisation de vidéos<br /> - etc.<br /> <br /> Edited September 4, 2011 by qwertyjjj Quote Link to comment Share on other sites More sharing options...
Jan Zonjee Posted September 4, 2011 Share Posted September 4, 2011 There are solutions for converting an UTF-8 file to an iso-8859-1 file because you are right, I remember this happening with text editors. But isn't it easier to start with a French language pack such as this or this one and add only the translations (for other addons) you need to those files? If you want to delete the english files you also need to remove the English language in your admin. Quote Link to comment Share on other sites More sharing options...
qwertyjjj Posted September 4, 2011 Author Share Posted September 4, 2011 (edited) There are solutions for converting an UTF-8 file to an iso-8859-1 file because you are right, I remember this happening with text editors. But isn't it easier to start with a French language pack such as this or this one and add only the translations (for other addons) you need to those files? If you want to delete the english files you also need to remove the English language in your admin. I have made quite a few customisations so I thought it wouldn't take that long just to change all the files in the language folder and go from there. I get this error: iconv --from-code=UTF-8 --to-code=ISO-8859-1 english2.php > newfile.php iconv: illegal input sequence at position 266 j@j-Inspiron-9300:~/Desktop/PP$ Edited September 4, 2011 by qwertyjjj Quote Link to comment Share on other sites More sharing options...
Jan Zonjee Posted September 4, 2011 Share Posted September 4, 2011 Perhaps this page is helpful. Quote Link to comment Share on other sites More sharing options...
qwertyjjj Posted September 4, 2011 Author Share Posted September 4, 2011 (edited) Perhaps this page is helpful. errors at the slash for some reason? <?php /* $Id: $ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright © 2007 osCommerce Released under the GNU General Public License */ define('TEXT_MAIN', ' <hr> <b style="color: rgb(7,75,138);"> Proxy vous offre l\ iconv: illegal input sequence at position 266 Edited September 4, 2011 by qwertyjjj Quote Link to comment Share on other sites More sharing options...
Jan Zonjee Posted September 4, 2011 Share Posted September 4, 2011 errors at the slash for some reason? iconv: illegal input sequence at position 266 Not a clue, but I would say, retype that character (or delete it) and try again. Quote Link to comment Share on other sites More sharing options...
MrPhil Posted September 4, 2011 Share Posted September 4, 2011 All Latin-1 (Western, 8859-1) characters are found in UTF-8, but there are many UTF-8 characters not found in Latin-1. Perhaps you used one of them? That would prevent the file from being converted to Latin-1. Or, the input file just got corrupted at some point, or iconv's encoding tables are corrupted. Quote Link to comment Share on other sites More sharing options...
qwertyjjj Posted September 15, 2011 Author Share Posted September 15, 2011 What file can I set the database charset in? I have changed header.php to use utf8 but some db characters still show oddly. I need to use mysql_set_charset somewhere Quote Link to comment Share on other sites More sharing options...
qwertyjjj Posted September 15, 2011 Author Share Posted September 15, 2011 This is just odd. database is in UTF8, when I view the product categories, they are saved with accents, the page loads in UTF8 but when I view the page it replaces all accents with odd characters. Quote Link to comment Share on other sites More sharing options...
MrPhil Posted September 16, 2011 Share Posted September 16, 2011 If your database is putting out UTF-8 characters, the language support files will have to be UTF-8, as must be the page display encoding. Check that your page is putting out a meta tag with charset UTF-8. If it is, go to View > Character Encoding (or the equivalent on your browser) and see what the browser thinks the encoding is. If it's not UTF-8, tell the browser to force the display of the page in UTF-8 and see if it looks OK. If it does, the problem is that your host is messed up, and the server is overriding whatever encoding you specify with Latin-1. Quote Link to comment Share on other sites More sharing options...
qwertyjjj Posted September 16, 2011 Author Share Posted September 16, 2011 (edited) meta is UTF-8, db is in UTF-general, there is no UTF-8 option. Page and browser think it is UTF 8. When I change it to WEstern ISO, it displays the characters correctly but inthe database they are saved with accents. The categories.php page where I save the catalog entries is displayed in Wester-ISO for some reason. How do I change that? Edited September 16, 2011 by qwertyjjj Quote Link to comment Share on other sites More sharing options...
qwertyjjj Posted September 16, 2011 Author Share Posted September 16, 2011 found it...english.php in the admin folder is set to western iso. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.