Gossamer Forum
Home : Products : Gossamer Links : Discussions :

Quotes and apostrophes do not display well

Quote Reply
Quotes and apostrophes do not display well
Quotes " and apostrophe like Nancy's do not display in Link. They become little box like symbols. What is the problem?

Thanks

Banana
Quote Reply
Re: [banana123] Quotes and apostrophes do not display well In reply to
Hi,

Check your database encoding and encoding configuration in Admin panel > Setup Options > Misc Options > header_charset

Cheers,
Boris

Facebook, Twitter and Google+ Auth for GLinks and GCommunity | reCAPTCHA for GLinks | Free GLinks Plugins
Quote Reply
Re: [banana123] Quotes and apostrophes do not display well In reply to
Mmm, sounds like you are using non-latin versions. For example a ` (thats a latin version, but there is a similar UTF8 version that shows up sometimes as "broken")

Do other characters like ινα etc all work ok?

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] Quotes and apostrophes do not display well In reply to
Hi, I changed it to Unicode. Now apostrophe became a box with a question mark in the middle. For a normal US site, what should be the right character-set?

Sharon
Quote Reply
Re: [banana123] Quotes and apostrophes do not display well In reply to
Hi Sharon,

Western (ISO-8859-1) should be ok, but it have to match your database encoding. Otherwise there would be mismatch between the db and the site.

Cheers,
Boris

Facebook, Twitter and Google+ Auth for GLinks and GCommunity | reCAPTCHA for GLinks | Free GLinks Plugins
Quote Reply
Re: [eupos] Quotes and apostrophes do not display well In reply to
Hi, can you explain this match? I am on Western (ISO-8859-1). How do I match database encoding?

Please help me.

Sharon
Quote Reply
Re: [banana123] Quotes and apostrophes do not display well In reply to
The database also have encoding, for example your database can be in UTF-8 and your site on ISO-8859-1.

When you have such situation the database expects UTF-8 input and you provide ISO-8859-1. This could cause some characters to be not properly encoded.

You can check your database configuration in Admin Panel > Database > SQL Monitor and then run the following query:

Code:
show variables like "character_set_database";

Cheers,
Boris

Facebook, Twitter and Google+ Auth for GLinks and GCommunity | reCAPTCHA for GLinks | Free GLinks Plugins
Quote Reply
Re: [eupos] Quotes and apostrophes do not display well In reply to
Boris and Andy:

Thank you very much. My database is Latin1 while my display is Western (ISO-8859-1). I think I will change the database encoding to Western.

Thank you very very muchSmileSmileSmile

Sharon
Quote Reply
Re: [banana123] Quotes and apostrophes do not display well In reply to
Hi, everyone:

The other admin told me it is very complicated and hard to change the encoding of MySQL. It is a big job. Is it true?

Sharon
Quote Reply
Re: [banana123] Quotes and apostrophes do not display well In reply to
Hi,

Why? If you have phpMyAdmin its VERY simple to convert a table / database into UTF8. Look for it under "Operations". It will most likely be stored as Latin (can't remember the exact name from the top of my head), but you want it as UTF8 (be sure to "convert" it).

Also - make 100% sure you backup all your database as a mysqldump to be sure you have a working copy in case the conversion doesn't work right!

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [eupos] Quotes and apostrophes do not display well In reply to
With glinks, in most cases, you can tell glinks to be in whatever character set and not touch the database. The only issue with this is that there's a small chance that you'll get incorrect search results and that will only happen if you have multi-byte characters and your search matches one byte of that multi-byte character. The other issue is when you do string operations that need to be mult-byte aware in MySQL and Perl (eg. string length). By default, glinks doesn't do any string operations like that in MySQL or in Perl.

What's important is that the connection character set (ie. how Perl connects to the MySQL) is the same as the database character set. This way no character set conversions happen when the data gets stored by MySQL. With glinks it communicates to MySQL by latin1 and MySQL by default is latin1 (though that might have changed with newer versions of MySQL). Even if we pass in utf8 data, no conversions happen and this is okay as long as when we display it, we tell the browser what character set it is.

One final advantage of doing things this way is that it's fast. We've found that with large sites, utf8 aware Perl and MySQL adds quite a bit of overhead.

Adrian