Jamroom Logo Jamroom 5 Core
is now Open Source!
User Support Forum Archive (Read Only)
User Documentation and How To's:
Flashback player - char problem
Michael
Jamroom Team


Joined: 22 Apr 2008
Posts: 3423
Location: Tokyo

Posted: 04/05/10 17:31 
it will only work for data entered AFTER you update it though. so once you change it make sure that you have the jamroom advanced config option set to

CONTROL PANEL -> ADMIN OPTIONS -> JAMROOM CONFIG -> ADVANCED SETTINGS -> jr_db_charset utf8


_________________
Michael Ussher
Jamroom Network Team Member: http://www.jamroom.net
Priority Support: http://www.jamroom.net/Support_Center
Back to top
jonsson



Joined: 31 Mar 2010
Posts: 47

Posted: 04/05/10 18:11 
Well.

Your last suggestion didn't change anything. And to be honest I am more than confused.

The "&aelig"-format of an Æ which should be the WRONG, are shown RIGHT on the screen,

The "Æ" format of an Æ which should be RIGHT are shown WRONG.

I will go to sleep before I get totally crazy - this makes no sense at all.

Tomorrow I will run a new installation from rock bottom in another directory and see how it reacts. Who knows - maybe one day I understand.

Back to top
Michael
Jamroom Team


Joined: 22 Apr 2008
Posts: 3423
Location: Tokyo

Posted: 04/05/10 18:36 
Smile Yes, character set can be a confusing mess. Which is why your doing the right thing by getting them straightened out now before your site has data in it.

to try to stop your head exploding from thinking about it, heres an explanation as far as i know it to be correct.

The "&aelig" is an HTML character not a unicode character.
The "Æ" character is a letter in a language.

The goal of setting your database to utf8 is to allow the use of any language to be stored as it is seen in the database. This means that when you look at it in phpmyadmin that you will be able to read it.

So that is one step. Get the database able to store the language in unicode so that it can be read.

Once you have your database set up so that it is ready to store characters in the correct format, then you must set up the connection between the database and php to know that it is allowed to use natural characters of any language. This is the advanced jamroom config setting.

it adds
Code
SET NAMES utf8
to the php connection to mysql.

Now you have your database in unicode so it can store any language, you have your connection in utf8 so it can transfer any language.

Next step is to set up your page so that it can DISPLAY any language. For this you are right about the headers needing to be set to utf8. This can be done with php

Code
header ('Content-type: text/html; charset=utf-8');


but usually can also be accomplished by adding the meta tag to the html

Code
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">

(note: dont rely on this, check it. IE6 does not respect this.)

You can use something like this: http://web-sniffer.net/ to check your site and see that the 'Accept-Charset' is set to UTF8

so now that you have your database, connection, and page set up to display in UTF8 you should almost be there. all of your content should be visible on your site in the correct layout with everything readable.

There is one last variable, Flash.

Here is where this thread started. Some flash players can display the unicode characters while others can not.

(disclaimer: im no flash expert.) One way around this i've heard is to embed the wanted character set into the flash player.

If this is done it has the effect of allowing the characters to be displayed from the embeded language to anybody, even people without that font active on thier system. Another way, which the jeroen seams to be using, is to pick up on the system fonts on the users computer. If the users computer is able to read japanese then the player will display japanese.

all of the players should be able to display the "&aelig" format of character. This is because it is an html character, not because they are capable of displaying the language.

So that would be your choice. If you wanted to convert all your characters to htmlentities then they would probably display on your players, but they would not be searchable on your search system. Its an option. Not the best on in my opinion though.


_________________
Michael Ussher
Jamroom Network Team Member: http://www.jamroom.net
Priority Support: http://www.jamroom.net/Support_Center
Back to top
jonsson



Joined: 31 Mar 2010
Posts: 47

Posted: 04/06/10 13:00 
Bigguy - you wrote.:

Actually the root cause of this is that your default MySQL collation is "latin1_swedish_ci", when it needs to be "utf8". Beginning with Jamroom 4.2, the Jamroom database will default to utf8 storage instead of relying on whatever the underlying database "default" is set to (which can cause issues on shared hosting).

This is copied from mysqladmin.:

Server: Localhost via UNIX socket
Serverversion: 5.1.32
Protokolversion: 10
Bruger: xxxxx@localhost
MySQL Tegnsæt: UTF-8 Unicode (utf8)

I downloaded the script unpacked it and copied it to a new directory and ran the installscript.

ALL tables which were created in my SQL database were latin1_swedish_ci.

Are you sure that the charset info is based on the serverinformation ?

I had to change all tables manually into UTF-8 - and EVEN after that was done, there were fields in the database VARCHAR fields which still mentioned latin1_swedish_ci.

I have a very strong feeling that this is the basic problem. Because obviously the change I do on table level doesn't update on cascade, and that might be the reason for the different writing of ÆØÅ in varchar fields (where the charcode is defined on column level) and ÆØÅ in textfields (where charcode are not defined).

Is there ANYWAY I can force the installationscript to make the database and underlying tables in UTF-8 ?

Please comment.

Back to top
Brian
Jamroom Team


Joined: 09 Jul 2003
Posts: 37583
Location: Seattle, WA

Posted: 04/06/10 13:11 

jonsson:
Bigguy - you wrote.:

Actually the root cause of this is that your default MySQL collation is "latin1_swedish_ci", when it needs to be "utf8". Beginning with Jamroom 4.2, the Jamroom database will default to utf8 storage instead of relying on whatever the underlying database "default" is set to (which can cause issues on shared hosting).

This is copied from mysqladmin.:

Server: Localhost via UNIX socket
Serverversion: 5.1.32
Protokolversion: 10
Bruger: xxxxx@localhost
MySQL Tegnsæt: UTF-8 Unicode (utf8)

I downloaded the script unpacked it and copied it to a new directory and ran the installscript.

ALL tables which were created in my SQL database were latin1_swedish_ci.

Are you sure that the charset info is based on the serverinformation ?


No - it will not do this in Jamroom 4.1.x. In Jamroom 4.2 you will be able to select this at install time, but in Jamroom 4.1.x you will need to go into the database AFTER you have installed and change your table collation.

- Brian


_________________
Make sure and check out:
* The Jamroom FAQ
* The Jamroom Documentation
Back to top
jonsson



Joined: 31 Mar 2010
Posts: 47

Posted: 04/06/10 13:23 
if I understand you correct then the script pick up the charset information from the server. Meaning that somewhere in my enviroment (either PHP.ini or SQL) I have stated latin1_swedish_ci as standard charset. Otherwise it would have made the tables differently ?

I have opened a ticket at the provider.

I understand if you don't want to spend too much time with this now that you are working on a different solution in v. 4.2. When do you think that will be ready (just a rough idea) ?

Back to top
Brian
Jamroom Team


Joined: 09 Jul 2003
Posts: 37583
Location: Seattle, WA

Posted: 04/06/10 13:29 

jonsson:
if I understand you correct then the script pick up the charset information from the server. Meaning that somewhere in my enviroment (either PHP.ini or SQL) I have stated latin1_swedish_ci as standard charset. Otherwise it would have made the tables differently ?

I have opened a ticket at the provider.


You change change the table collation using phpMyAdmin - click on the table on the left, and in the Properties section you can set it to UTF8.


Quote:

I understand if you don't want to spend too much time with this now that you are working on a different solution in v. 4.2. When do you think that will be ready (just a rough idea) ?


We're shooting for an end of May/beginning of June release.

Hope this helps!

- Brian


_________________
Make sure and check out:
* The Jamroom FAQ
* The Jamroom Documentation
Back to top
jonsson



Joined: 31 Mar 2010
Posts: 47

Posted: 04/06/10 13:55 
Yes. I did that already, but it hasn't solved anything at all. Ran a sniffer on my page and the HTML output are still handling ÆØÅ letters different in VARCHAR compared to TEXT. And the complete opporsite around in the database. In other words, there is definately some mismatch in reading and writing in the database. Also in the fresh testinstallation. The result is the exact same. Anyway - I will wait for my provider and see what he has to say about PHP.ini and charset. And if it doesn't help then I will live with this untill the release 4.2. Hopefully that will fix the problem.

Back to top
Michael
Jamroom Team


Joined: 22 Apr 2008
Posts: 3423
Location: Tokyo

Posted: 04/06/10 20:07 
should be able to get it going without touching php.ini

* upload files to server
* create database on server
* enter phpmyadmin and run the SQL query 'alter database `THE_DATABASE_NAME` charset utf8'
* complete the install from a browser
* go to jamroom config and set the advanced setting to jr_db_charset to 'utf8'

Thats about it.

If you have utf8 working correctly some of the flash players will NOT work.


_________________
Michael Ussher
Jamroom Network Team Member: http://www.jamroom.net
Priority Support: http://www.jamroom.net/Support_Center
Back to top
jonsson



Joined: 31 Mar 2010
Posts: 47

Posted: 04/17/10 14:37 
I have a feeling that this little "-" has something to do with it, but I'm not sure.

There is definately some strange behaviour going on when I write utf8. Letters in the database and on the site looks very strange.

But changing to utf-8 makes the right entries in the database. The strange part here is that the blog entered when the charset was set to utf8, now appears right on the site, while the one entered on charset utf-8 are right in the database but wrong on the site.

in the dbase the characterset has the syntax utf-8. I wonder if this could have something to do with it.

Anyway - I will still await the new version and test it from there.

Back to top
Intalik



Joined: 19 Sep 2006
Posts: 204

Posted: 09/01/10 05:20 
I am having the same problem.

I am running jamroom with danish letters as well (Ææ, Øø, Åå) however on my jamroom site (front page "www.mysite.com" for example) they display thus:

Æ = æ
Š= å
Ø = ø

HOWEVER, they display PROPERLY in any control panel input field.

ALSO, it is strange, on my front page i have admin articles displayed. the title displays the characters incorrectly (i.e. ø) BUT the text body displays the characters correctly (i.e. Ø).

i have tried the various utf8_unicode_ci, utf_general_ci, utf8_danish_ci combinations (changing the info both in jamroom control panel and mysql database), resetting cache, integrity check, resetting server. still the same problem.

i am running jamroom-4.2.1 and it is a fresh install on a local MAMP server (I have this same problem on my live site on jbservers.net)

Any ideas?


* ADDITION *
i just found that it works fine with Cobalt3, Sage and Nova skins. So it is simply not working with my own modified skin (created in version 4.0). I will check out what code i am using and return.

Back to top
Intalik



Joined: 19 Sep 2006
Posts: 204

Posted: 09/01/10 18:17 
I just upgraded to jamroom-4.2.2. and it seems the problem has been resolved. Now all my Ææ Øø Åå display porperly.

Thank you Jamroom

Back to top
Intalik



Joined: 19 Sep 2006
Posts: 204

Posted: 09/01/10 20:52 
it works EXCEPT in blog "read more":

http://localhost/jamroom-4.2.1/articles/*YOUR_BLOG_NAME*

and it is only the title that does not display properly. The body displays the characters alright.

Back to top
Intalik



Joined: 19 Sep 2006
Posts: 204

Posted: 09/02/10 05:59 
So i corrected character display problem by changing my language file (en-US.php and dk-DK.php) adding "utf-8" or "utf8" (it seems to work either way) rather than "iso-8859-1". Now blog body and blog title display the correct danish characters (when displaying either danish or english language on my jamroom site).

However, all other text on my site called through my skin language files do not display the danish characters nor apostrophes. Now they simply display a question mark inside a black diamond.

I am thinking this might now have something to do with my local MAMP server.

any ideas?


My database charset is set as utf8 and collate: utf8_unicode_ci.

My jamroom advanced settings are charset: utf8 and collate: utf_unicode_ci
it confirms this information in settings.cfg.php as well.

Back to top
Michael
Jamroom Team


Joined: 22 Apr 2008
Posts: 3423
Location: Tokyo

Posted: 09/02/10 19:57 
my best guess (because i cant see the page) is that the page that is showing the ???? ??? ???? is set to the wrong character set in its meta tags.

open the pages source code and check that it is utf8 too.


_________________
Michael Ussher
Jamroom Network Team Member: http://www.jamroom.net
Priority Support: http://www.jamroom.net/Support_Center
Back to top
Display posts from previous:   
User Support Forum Archive (Read Only)
User Documentation and How To's

< Previous123Next >
 
Solutions
• Social Media Platform
• Social Networking Software
• Musician Website Manager
• Community Builder
Products
• Jamroom Core
• Jamroom Addons
• Jamroom Modules
• Jamroom Marketplace
Support
• Support Forum
• Documentation
• Support Center
• Contact Support
Community
• Community Forum
• Member Sites
• Developers
Company
• About Us
• Contact Us
• Privacy Policy
©2003 - 2010 Talldude Networks, LLC.