Gossamer Forum
Quote Reply
Character Encoding
Hi,

I'm currently working on a CMS system for our LinksSQL installation but I am experiencing some issues with character encoding.

If you take a look at this page - http://www.bn23.com/channels/Lifestyle/telepathy---hello--is-anyone-home--.html - You should see lots of strange characters such as
all over the page.

I find this odd as the text appears absolutely fine in the database, it's only when I retrieve the text using LSQL's modules that I get the problem.

I've tried changing the character encoding of the page from iso-8859-1 to utf-8 but this simply removed the strange
(and some of the legitimate) characters when using FireFox while Internet Explorer just replaced the strange characters with a square.

Any ideas on where I'm going wrong?

Thanks,
Kev



-------
BN23.com - LinksSQL powered search and directory.
5.2 Million Links, 685,000 Categories
Quote Reply
Re: [b0rdslide] Character Encoding In reply to
In Reply To:

I find this odd as the text appears absolutely fine in the database, it's only when I retrieve the text using LSQL's modules that I get the problem.
Which tool do you use to query these text from database? I am araid that the text was encoded as utf8 before they are stored in database.

In Reply To:
I've tried changing the character encoding of the page from iso-8859-1 to utf-8 but this simply removed the strange(and some of the legitimate)
characters when using FireFox while Internet Explorer just replaced the strange characters with a square.

Any ideas on where I'm going wrong?


I still see the '?' char on firefox when changing encoding style to utf8.

I am experiencing this problem too but my text are store in flat files. My approach is before storing, I convert them to the cp1252 charset by using Encode module.

Any suggestions will be appreciated.

Cheers,

Dat

Programming and creating plugins and templates
Blog
Quote Reply
Re: [tandat] Character Encoding In reply to
I'm using phpmyadmin to view the database content as I wanted to make sure it would display in a web environment. The pages it generates are also iso-8859-1 encoded which leaves me to believe it may be something to do with retrieving the data through linkssql.

The content is obtained through standard web forms with iso-8859-1 encoding, then inserted into the database using the linkssql modules.

Kev

-------
BN23.com - LinksSQL powered search and directory.
5.2 Million Links, 685,000 Categories

Last edited by:

b0rdslide: Nov 26, 2004, 10:56 AM
Quote Reply
Re: [b0rdslide] Character Encoding In reply to
Are you on Apache 2.xx? I have some test page with charset iso-8859-1 but the text is still utf8 encoded.

Cheers,

Dat

Programming and creating plugins and templates
Blog
Quote Reply
Re: [tandat] Character Encoding In reply to
Hi,

I have just found out. Just to change the 'AddDefaultCharset' to 'ISO-8859-1' in the httpd.conf and to restart the web server will work.

Cheers,

Cheers,

Dat

Programming and creating plugins and templates
Blog
Quote Reply
Re: [tandat] Character Encoding In reply to
Thanks for the info Dat, we've asked Gossamer to make the changes on our servers, will post an update on how it worked once it's done.

Kev

-------
BN23.com - LinksSQL powered search and directory.
5.2 Million Links, 685,000 Categories
Quote Reply
Re: [tandat] Character Encoding In reply to
Hi Dat,

We've set the AddDefaultCharset in our .htaccess files as instructed by our host but this appears to have no noticeable affects. I think our problem may lie elsewhere considering the content shows fine in phpMyAdmin which is running on the same server. Unsure

Kev

-------
BN23.com - LinksSQL powered search and directory.
5.2 Million Links, 685,000 Categories
Quote Reply
Re: [b0rdslide] Character Encoding In reply to
Hi,

The old should be updated. Do you still problem with new text? To set in .htaccess file, it depends on your AllowOverride mode. If it is None, this settting won't be affected.

Just let me know.

Cheers,

Dat

Programming and creating plugins and templates
Blog
Quote Reply
Re: [tandat] Character Encoding In reply to
OK, this is really odd. The text is output perfectly fine on the article editing page, yet on the page which displays the article in a viewable state the text has the odd characters. I can't really understand this as both pages are calling the same global to obtain the article text and both pages contain exactly the same http-equiv meta data.

Kev

-------
BN23.com - LinksSQL powered search and directory.
5.2 Million Links, 685,000 Categories
Quote Reply
Re: [b0rdslide] Character Encoding In reply to
Hi,
This may not be relevant but even when I have the european iso foramt selected in html headers and in the httpd.conf I get the weird unrecognized type characters in FireFox now and again but not in IE (for foreign characters like , , etc.)

I have this in my headers :
<meta http-equiv="content-type" content="text/html;charset=iso-8859-1">

and this in the httpd.conf :

AddDefaultCharset ISO-8859-1

AddCharset ISO-8859-1 .iso8859-1 .latin1

But this doesn't seem to stop me from sometimes getting weird display of characters in FireFox but never seems to have effected IE so far...

John
Significant Media