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
itp



Joined: 08 Oct 2009
Posts: 69

Posted: 03/30/10 08:53 
Hello all.
I'm First time on this Forum and i have first, two questions Wink
I'm using Flashback and i have problem with polish diacritics like for example :Ąążźćł in flashplayer .
- it is possible to change this ?
- if not, where can i implement my own PHP function to repleace polish chars ( where ) ?
My codepage is UTF-8.



Greetings

Back to top
smith.kyle
CodeSmith


Joined: 27 Apr 2006
Posts: 22009
Location: Southern California

Posted: 03/30/10 22:21 
itp -

Welcome to the Jamroom Forums!

I believe you would need to have the flash player compiled with support for polish characters (although I'm not entirely sure). Try contacting daddysylem at DS Players and he might be able to do that for you.

Hope that helps!

Kyle


_________________
kyle[at]jamroom.net

Yes...that's a soda machine...

I get bored when no one's posting...
Back to top
Michael
Jamroom Team


Joined: 22 Apr 2008
Posts: 3423
Location: Tokyo

Posted: 03/30/10 22:54 
The jeroen player will work fine for all characters, even funny ones.

use player_type="jeroen" more info here:
http://www.jamroom.net/Jamroom4_jr_flash_player


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


Joined: 30 Mar 2005
Posts: 4086
Location: Southern California

Posted: 03/31/10 09:33 
Hi itp

If you would like to contact me by email, I would like to try a few things to see if I can get this language issue resolved with the Jamroom players. My biggest problem up to now is that I don't have different language sites that I can work with for testing.

If you can contact me by email using the button in my profile below,
I'll see if I can help you and at the same time you can help me.... Wink

Thanks,
Greg -


_________________
I have no idea why I do this..................
Email: daddysylem[at]dsplayerskins.com
DSPlayerSkins.com
GCFireSprinkler.com
Back to top
jonsson



Joined: 31 Mar 2010
Posts: 47

Posted: 04/04/10 17:08 
I have the exact same problem with danish letters in cobalt3.

I think the code is the same as the polish.

Ussher - could you be a bit more specific. I have the power pack, but I don't see any jr_flashplayer in my templates.

Back to top
jonsson



Joined: 31 Mar 2010
Posts: 47

Posted: 04/05/10 08:18 
The cobalt databases saves the songname in swedish.

The default player in the lower right corner of the artists songpage shows the letters correctly. In the script for that player the UTF-8 code is mentioned.

I looked in the database and there it is saved in latin swedish.

The songname header on the page are exactly as it is saved in the database - with strange letters.

If you click on Lyrics, the songname again is shown strange as saved in the database.
Also the headers on the blog are shown strange.

BUT - and here it becomes pretty interesting : The lyrics itself are shown correctly and so are the maintext in the blog.

So without being a specialist at the area - not at all, I say this must be a question on how the header string are handled once it is loaded from the database. It looks like it picksup the data for the headlines "unconverted", while the underlaying data are converted somehow to be readable on the page.

Can these observations give a hint to a solution ?


BestRegards
Lasse[/img]

Back to top
jonsson



Joined: 31 Mar 2010
Posts: 47

Posted: 04/05/10 08:24 
btw - I'm working on a translation of the language file into danish, so it would be great to have this fixed.

Back to top
jonsson



Joined: 31 Mar 2010
Posts: 47

Posted: 04/05/10 09:08 
This is digged up in the MySQL reference manual and concerns VARCHAR and language codes:

Connect with the same characterset as your data to display correctly. This example connects to the MySQL-server using UTF-8:

mysql --default-character-set=utf8 -uyour_username -p -h your_databasehost.your_domain.com your_database

If you get into trouble from a PHP-based web application, check the characterset configurations of these components:

1) the MySQL database
2) php.ini
3) httpd.conf
4) your server

At least it looks like the problem are connected to the VARCHAR type.

Back to top
Brian
Jamroom Team


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

Posted: 04/05/10 10:14 
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).

What you need to do is go into your database using phpMyAdmin, and set the table collation for all of your tables to "utf8". Next, you need to set the Jamroom "jr_db_charset" Advanced Key to "utf8" as well:

http://www.jamroom.net/Jamroom4_Advanced_Settings#jr_db_charset

You may need to re-enter any data that is currently in the DB it is stored correctly

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/05/10 13:36 
Change all row in the tables into charset utf8-danish and afterwards all the tables into utf8 to make sure that everything was right from top to buttom.

Added the jr_db_charset in advanced to utf8 as well.

That does not fix the problem. NOTE that the underlying information such as lyrics, and text - everything with the datatype TEXT actually are stored and shown correct. Where the chain breaks is when we deal with data from VARCHAR

Any other ideas ?

Back to top
jonsson



Joined: 31 Mar 2010
Posts: 47

Posted: 04/05/10 13:50 
in the table jamroom_songinfo I check up to colums: Song_name and song_lyrics.

In song_name I can read the 3 special danish letters, but strange letters shows up on the screen.

in song_lyrics I see strange letters, but they show up alright on the screen.

lyrics are TEXT
songname are VARCHAR.

It looks like it converts the opposite way around when it saves the song_name data.

Any bids ?

Back to top
Brian
Jamroom Team


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

Posted: 04/05/10 16:03 
I have never seen anything like that - when the collation is set at the table level, it is set for each column in the table (both VARCHAR and TEXT). Have you set character sets on individual columns in your tables?

Thanks!

- Brian


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



Joined: 31 Mar 2010
Posts: 47

Posted: 04/05/10 17:18 
I wanted to be 100% sure so I changed first on column level, and afterwards on table level. I am pretty sure it would have been enough to do it on table level only.

But yes - in PHP myadmin you can see the charset on columnlevel.

In this exact table jamroom_songinfo the properties are as described

song_lyrics: TEXT - UTF8-Danish
song_name.: VARCHAR255 - UTF8-Danish

When the lyrics are written in the column song_lyrics, it is written correct as.:

The danish letter "Æ" = &aelig
The danish letter "Ø" = ;&oslash
The danish letter "Å" = ;&aring

BUT the same letters written in the column song_name it is written as.:

Æ = Æ
Ø = Ø
Å = Å

When the script calls the data in the column song_lyrics it converts it the other way around

&aelig = Æ etc...

BUT when it calls the data in the song_name - it already have wrong datas to work with and I end up with letters on the screen like this: Æ Ø Ã

What I REALLY don't understand is that the player in the lower right corner manage to convert it into the right text.: http://www.hgv5.dk/dinmusik/Studio_HGV5/audio.php

However - it is clear to see that the script fails somewhere and saves the danish letters in two different ways within the same table and the same script process.

I thought the problem was linked to the VARCHAR type, but even if I change the column into TEXT - the danish letters are still saved differently.

I found one file which were saved in ANSI format where it should be UTF8, I will check all PHP, HTML and CGI files and see if there are other files like that. It could affect the output, but so far all files in the media library and the member library are all UTF8. But just to be on the safe side I will check that.

Can you tell me excactly which scripts are used and called in the "write song to database" ? That would be extremely handy as it MUST be within one of those scripts the error occur.

It is driving me crazy !

Back to top
Michael
Jamroom Team


Joined: 22 Apr 2008
Posts: 3423
Location: Tokyo

Posted: 04/05/10 17:26 
what you should be seeing in your database is:
Æ = Æ
Ø = Ø
Å = Å

EXACTLY the same as you want to see it on screen. if your seeing the &aelig in the database, this is wrong.

I know UTF8-Danish may seem right, but the whole point of unicode is to do-away-with having to tell the database anything about what language you are using. I always use UTF8 with the collation utf_general_ci which has solve all issues.

But just changing the database settings is going to do nothing for the data that is already in there.

If you have data that is already in there then you have a bigger issue that is harder to deal with.

Is starting again an option or is there too much data?


_________________
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 17:29 
I will update the code to generel and see if that works.

Back to top
Display posts from previous:   
User Support Forum Archive (Read Only)
User Documentation and How To's

123Next >
 
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.