Jump to content
Sign in to follow this  
qwertyjjj

French charset?

Recommended Posts

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

Share this post


Link to post
Share on other sites

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?

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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?

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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 />

Share this post


Link to post
Share on other sites

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 by qwertyjjj

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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 by qwertyjjj

Share this post


Link to post
Share on other sites

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 by qwertyjjj

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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 by qwertyjjj

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×