Please login or register.

Login with username, password and session length
Advanced search  

News:

Latest sNews - sNews 1.7 - with its own forums - for discussion and user mods.

Author Topic: sNews website in French  (Read 6721 times)

curiousEngine

  • Newbie
  • *
  • Karma: 0
  • Posts: 18
sNews website in French
« on: January 28, 2008, 11:02:54 am »

Bonjour!!

I am trying to create a sNews website in French. The problem is that my PHPmySql with utf_unicode collaction does not allow e accent aigu, grave, a accent circonflexe etc to be stored. what's the correct collation to be used.

thank you!
Logged

Sven

  • ULTIMATE member
  • ******
  • Karma: 88
  • Posts: 2029
  • Chasing MY bugs!
    • hiseo.fr - rédacteur Web
Re: sNews website in French
« Reply #1 on: January 28, 2008, 04:42:10 pm »


It works for me. :)

Keyrocks

  • Doug
  • ULTIMATE member
  • ******
  • Karma: 449
  • Posts: 6020
  • Semantically Challenged
    • snews.ca
Re: sNews website in French
« Reply #2 on: January 28, 2008, 05:52:39 pm »

Bonjour!!
I am trying to create a sNews website in French. The problem is that my PHPmySql with utf_unicode collaction does not allow e accent aigu, grave, a accent circonflexe etc to be stored. what's the correct collation to be used.
thank you!
This will depend on where you are using phpMyAdmin. My databases store french characters OK and they display OK in the articles when retrieved both offline (localhost) and on my online host server.
Working with phpMyAdmin online... from your host's CPanel - MySQL itself should have its charset set to UTF8 Unicode (utf8). After you have created a NEW database using the MySQL panel you would normally click on the phpMyAdmin link at the bottom of the panel... and that would lead you to the phpMyAdmin Panel. And you would then click on your database name to add the new tables to it.

You should see a line above the "MySQL connection collation:" field like - MySQL charset: UTF-8 Unicode (utf8).
And, from the dropdown field... you would choose utf8_unicode_ci so that it will also apply to your tables when you run the query to create them.
Logged
Do it now... later may not come.
-------------------------------------------------------------------------------------------------
sNews 1.6 MESU | sNews 1.6 MEMU

curiousEngine

  • Newbie
  • *
  • Karma: 0
  • Posts: 18
Re: sNews website in French
« Reply #3 on: January 29, 2008, 04:34:40 am »

I am using :
Welcome to phpMyAdmin 2.7.0-pl2
MySQL 5.0.18-nt-log running on localhost as root@localhost

on the latest version of apache2triad.

Keyrocks, I've tried changing the collation, but of no use with the local database.

HOWEVER, with my online MySQL, everything works fine.

The problem is that I badly need the local MySQL database to work fine with my data. I agree french it does not works. But even with english, i've tried exporting data from my online database to the local host, and much data contains weird symbols like @#$$%%$#@$$$ and the rest are the good english.

Is the problem with the local MySQL. which mySQL is recommended?XAMPP, EasyPHP or another other recommendation would be welcomed.

Thank you all,
Have a nice day...
Logged

Joost

  • Guest
Re: sNews website in French
« Reply #4 on: January 29, 2008, 05:01:15 am »

On my system (I have installed everything separate) everything looks ugly in PHPmyadmin Like this:
café
However outputted to the browser, it reads: café. Like it should. So maybe the problem is the way Apache sends the characters (or the header info) to the browser. Try adjusting the character encoding in htconfig (apache).
For FF http headers take precedence over "meta http-equiv" in the file itself.
Hope it helps.
Logged

Keyrocks

  • Doug
  • ULTIMATE member
  • ******
  • Karma: 449
  • Posts: 6020
  • Semantically Challenged
    • snews.ca
Re: sNews website in French
« Reply #5 on: January 29, 2008, 03:17:19 pm »

On my system (I have installed everything separate) everything looks ugly in PHPmyadmin Like this: café However outputted to the browser, it reads: café. Like it should.
So maybe the problem is the way Apache sends the characters (or the header info) to the browser. Try adjusting the character encoding in htconfig (apache).
For FF http headers take precedence over "meta http-equiv" in the file itself.
Hope it helps.

I too am using XAMPP. Mine is a WinXP version (1.5.3a) with MySQL 5.0.21-community-nt, Apache 2.2.2 (win32) and PHP 5.1.4.
My data does not look the same in the table as it does when displayed either. As examples - = À (in data) displays À and  à (in data) displays à.

I had a look in my Apache/conf/httpd.conf (configuration) file and noted... down near the bottom:
     # Language settings
     Include conf/extra/httpd-languages.conf
... and in that file... at the top... it says "Reqired modules: mod_mime and mod_negotiation".
Another look in the httpd.conf file... and I notice that both those modules are enabled as:
     LoadModule mime_module modules/mod_mime.so
     LoadModule negotiation_module modules/mod_negotiation.so

Perhaps you might also have a good look through the httpd-languages.conf file. To be honest... I am not really sure what the file is for as I haven't had language issues before with my Apache/MySQL installation... but getting to know these configuration files will be of some value. At least you will know what is enabled and not enabled. Mine definitely has  AddLanguage fr .fr and AddCharset UTF-8   .utf8 enabled.
Logged
Do it now... later may not come.
-------------------------------------------------------------------------------------------------
sNews 1.6 MESU | sNews 1.6 MEMU

curiousEngine

  • Newbie
  • *
  • Karma: 0
  • Posts: 18
Re: sNews website in French
« Reply #6 on: February 02, 2008, 05:15:43 am »

Doest it mean that the solution lies in Try Using
1) XAMPP or another LAMP bundle? on a Windows PC?
0r
2) Take a PC, Install LAMP, L-Ubuntu, A-Apache from the official website(latest version), M-MySQL from the official website(latest version) and Php ?


Logged

Joost

  • Guest
Re: sNews website in French
« Reply #7 on: February 02, 2008, 05:24:35 am »

Configuring Apache's htconfig didn't work for you?

Sorrry, I meant httpd.conf
Logged

Fred K

  • Still trying to learn stuff
  • ULTIMATE member
  • ******
  • Karma: 130
  • Posts: 2728
    • Personal
Re: sNews website in French
« Reply #8 on: February 02, 2008, 05:24:51 am »

curious,

What the others have already said is that the accented characters will look "odd" in the database, no matter which collation setting you use. As far as I know, using the same character set everywhere is the key. Meaning that if your database collation is set to UTF-8 unicode_ci, then your snews.php and index.php should be saved with encoding UTF-8 and no BOM (I think it's also referred to as saving in ANSI and UTF-8), and the character setting for your site should be UTF-8 -- this setting can be changed via the sNews Admin panel (Settings/Time and Locale). The main thing: use the same character set everywhere. Then it should reasonably work. It does for me anyway (using Swedish accented characters).
Logged

Keyrocks

  • Doug
  • ULTIMATE member
  • ******
  • Karma: 449
  • Posts: 6020
  • Semantically Challenged
    • snews.ca
Re: sNews website in French
« Reply #9 on: February 02, 2008, 05:26:15 am »

Doest it mean that the solution lies in Try Using
1) XAMPP or another LAMP bundle? on a Windows PC?
0r
2) Take a PC, Install LAMP, L-Ubuntu, A-Apache from the official website(latest version), M-MySQL from the official website(latest version) and Php ?

My only "localhost" experience is using XAMPP with XP Home on my PC and XAMPP Lite with XP Pro on my Acer laptop. I have no experience with any other configurations. If you are not using what I use... then my suggestions will not likely help you at all... sorry.
Logged
Do it now... later may not come.
-------------------------------------------------------------------------------------------------
sNews 1.6 MESU | sNews 1.6 MEMU

curiousEngine

  • Newbie
  • *
  • Karma: 0
  • Posts: 18
Re: sNews website in French
« Reply #10 on: February 04, 2008, 05:58:12 am »

Finally I installed LAMP on my Laptop as described in my blog: http//ramjeeawon.info/HTML/LAMP, and I am happy!

After enabling mod_rewrite on apache2, I tried to import the database (online) to the local new phpmyadmin in LINUX now and It worked fine. I tested to enter articles with french accent etc. and everything was spick and span.

I will try XAMPP lite later (I had previous bad experiences with it.) .

Concerning apache2Triad, no comments.
Logged

Joost

  • Guest
Re: sNews website in French
« Reply #11 on: February 04, 2008, 06:36:08 am »

Congrats Ashesh.  :)
Logged

curiousEngine

  • Newbie
  • *
  • Karma: 0
  • Posts: 18
Re: sNews website in French
« Reply #12 on: February 07, 2008, 01:54:35 pm »

Thank you Joost ;D

The following book has helped me to setup up the LAMP system so that sNewsMU can start rocking on it!
http://www.amazon.com/Beginning-Ubuntu-Server-Administration-Professional/dp/1590599233/ref=pd_bbs_sr_1?ie=UTF8&s=books&qid=1202388690&sr=8-1

I hope this will be useful! ;)
Logged