1
kevcar
How do I change charset=UTF-8
  • 2008/8/2 14:51

  • kevcar

  • Not too shy to talk

  • Posts: 127

  • Since: 2007/6/2 1


I have updated to XOOPS 2.3 and it installed
charset=UTF-8 and I now have ? symbols on my website, I live in the UK so what Charset should I be using and how do I change it?

2
DarinAllan
Re: How do I change charset=UTF-8

I thought I saw a post by Mamba that suggested it could be a browser problem, but I can't find the post so I could be wrong.

I use Firefox 3 on Linux so this may not be exactly the same.

If you are using Firefox go to View >>> Character Encoding >>> UTF-8

I was having this same problem but it seemed to fix itself with an upgrade I think or maybe I adjusted the browser lol, I just can't remember, but I do have FF3 set to UTF-8.

If you use Internet Exploder I don't know that at all. ;o)

3
trabis
Re: How do I change charset=UTF-8
  • 2008/8/2 18:47

  • trabis

  • Core Developer

  • Posts: 2269

  • Since: 2006/9/1 1


Update your system module,

If it does not work then Try edit mainfile and replace utf by latin1.

Close your site, don´t submit new content until you resolve this issue, after making changes try submit content with special characters like á ç etc and see if how they are being recorded in the database.

I still not get it you know. This collation stuff. I see people releasing language files with utf-8 full of weird stuff that only a machine can read, does not make sense for me. I will keep my latin and my dear ISO in my language files so I can see things as the are in database and files.

4
kevcar
Re: How do I change charset=UTF-8
  • 2008/8/2 19:23

  • kevcar

  • Not too shy to talk

  • Posts: 127

  • Since: 2007/6/2 1


Thanks for the info.

all I can find on the mainfile about charset is this:

// Set the database charset if applicable
if (defined("XOOPS_DB_CHARSET")) die();
define( 'XOOPS_DB_CHARSET', '' );

5
trabis
Re: How do I change charset=UTF-8
  • 2008/8/2 20:34

  • trabis

  • Core Developer

  • Posts: 2269

  • Since: 2006/9/1 1


I supose you have to add utf8 inside it

// Set the database charset if applicable
if (defined("XOOPS_DB_CHARSET")) die();
define( 'XOOPS_DB_CHARSET', 'utf8' );

6
kevcar
Re: How do I change charset=UTF-8
  • 2008/8/2 20:52

  • kevcar

  • Not too shy to talk

  • Posts: 127

  • Since: 2007/6/2 1


I try that out, thanks for that

Kevin

What a nightmare

7
anderssk
Re: How do I change charset=UTF-8
  • 2008/8/5 17:40

  • anderssk

  • Quite a regular

  • Posts: 335

  • Since: 2006/3/21


Maybe this should be a FAQ, because I belive many users will have this experience when upgrading to 2.3.0

I do not think the right solution is to go back to ISO encoding. The solution must be to re-encode language-files from ISO to UTF-8.
Maybe because I'm from Denmark and we have some special characters.

I'm using Notepad++

Open Your language-files and select Format -> convert to UTF-8 (without BOM)
Save the file again.

Then the encoding are correct.

8
kevcar
Re: How do I change charset=UTF-8
  • 2008/8/5 17:50

  • kevcar

  • Not too shy to talk

  • Posts: 127

  • Since: 2007/6/2 1


Thanks for that

9
ghia
Re: How do I change charset=UTF-8
  • 2008/8/8 0:54

  • ghia

  • Community Support Member

  • Posts: 4953

  • Since: 2008/7/3 1


It is not only a question of language files.

It is also affecting the SQL files used at module install.
I'm evaluating Xoops 2.3.0rc and ran in the following problem:
When installing formulaire, the fields in the example form where truncated to the first accented character.
This was because the install routine of the XOOPS system proposed UTF-8. I deleted the database and did the install again this time with latin1 and latin1_general_ci. Now the tables and the database where recreated and had the correct encoding to receive these kind of SQL. Hereafter the install of the formulaire module gave complete and correct fields for the accented characters in the database. However in the display of the browser (FF 3.0.1 and also IE6) the accented characters where replaced by blockimages.
The cause of this was the english language selection, where in /language/global.php the '_CHARSET' was defined to 'UTF-8'.
The header of the html page identified also the character encoding as UTF-8.
Apparently there was no conversion done from the database character set to the html output character set.

Installing and switching to the dutch language (my sites default) where '_CHARSET' is defined as 'ISO-8859-1' let correctly appear the accented characters.

While eastern languages may need / benefit from UTF-8, it seems to me that European languages are more advantagous to use latin1.

Maybe there should be an explication note added to the selection box in the XOOPS install procedure that points out these things.

10
anderssk
Re: How do I change charset=UTF-8
  • 2008/8/8 15:09

  • anderssk

  • Quite a regular

  • Posts: 335

  • Since: 2006/3/21


If you change to latin1 in global.php and in MySQL You run with ISO encoding.
Thats a big way around instead of re-encode formulaire's language files.
If you run the installation with UTF and uses Formulaire with english language, You don't have any problems?

Login

Username:
Password:

Lost Password? Register now!

Who's Online

66 user(s) are online (45 user(s) are browsing Support Forums)


Members: 0


Guests: 66


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Nov 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits