Page 1 of 2

Template modification with polish charset - entities ?

Posted: Sun 20. May 2007, 11:05
by jareeq
Hi,

I'm looking for solution of this problem:

in Admin -> temlplates typing polish test string:

'zażółć gęślą jaźń'

in 'main', 'left', 'right' or any other window, aftrer saving template text looks like:

'za¿ó³æ gê¶l± ja¼ñ'

after second save operation it looks like:

'za¿ó³æ gê¶la ja¼ñ'

on page no polish chars are displayed - anyone knows a solution ?

Thanks,
Jarek

Posted: Sun 20. May 2007, 11:16
by pico
Hi

wich Version ?

check Charset in conf.inc.php and Collation of Database - seems there is a mismatch

Posted: Sun 20. May 2007, 11:34
by jareeq
sorry i forgot paste it
but problem is no there :

version 1.3.3

$phpwcms['db_charset'] = 'latin2';
$phpwcms['db_collation'] = 'latin2_general_ci';
$phpwcms['charset'] = 'iso-8859-2';

also checked with

$phpwcms['db_charset'] = 'utf8';
$phpwcms['db_collation'] = 'utf8_general_ci';

in 1.2.8 some time ago i'v changed somethig i include files from html_entities to htmlspecialchars and that solved a problem - but now i don't remember where exactli it was :)

this problem only shows in templates - modification of article contenet looks fine

any other ideas ?

[UPDATE]
$phpwcms['db_charset'] = 'utf8';
$phpwcms['db_collation'] = 'utf8_general_ci';
$phpwcms['charset'] = 'utf-8';

works fine but page in polish displas wrong (with chinesse an dother strange characters)

Posted: Mon 21. May 2007, 08:21
by pico
check what Collation your DB realy has (phpMyAdmin) and set this to conf.inc.php - a change here will never 'Re-Collate' your Database ;)

and never change this in a running System - it will end in mixed Chars.

Posted: Mon 21. May 2007, 10:39
by jareeq
So it looks like all operations doing right if all is set to

$phpwcms['db_charset'] = 'utf8';
$phpwcms['db_collation'] = 'utf8_general_ci';
$phpwcms['charset'] = 'utf-8';

database collation is utf8_unicode_ci, but I didn’t see any mismatch in text, but second problem appears in Backend interface translation in /include/inc_lang/backend/pl/lang.inc.php, now I’ve converted it to utf-8 file and almost all char sets are ok, some investigation and it should looks fine:
But it is strange – in 1.2.8 Im using

$phpwcms['db_collation'] = 'utf8_general_ci';
$phpwcms['charset'] = 'iso-8859-2';

And it looks fine without any modification ;)

Now I’m looking for fckeditor – filestorage integration I found that it works with previous version of phpwcms-XT, do you know there is any guide to patch or modify fckeditor for filestorage in standard phpwcms ?

Thanks for previous advices :)

Posted: Thu 11. Oct 2007, 10:54
by splette
Hi,

I am working on a polish website right now and experience the same problem. When I copy&paste polish characters into the template and save, I get the same mashup. Then save again and its converted again. However, when my Polish collegue types Polish characters they work fine. Only when I do (with my German keyboard) the conversion happens. Also, I seem to be able to create articles with Polish characters. The strange behaviour only happens in the template. Why? Any solutions? Should I change it to UTF8?

My database collation is 'latin2_general_ci' and I use PHPWCMS 1.3.3

$phpwcms['db_charset'] = 'latin2';
$phpwcms['db_collation'] = 'latin2_general_ci';
$phpwcms['charset'] = 'iso-8859-2';


Thanks
Thomas

Posted: Thu 11. Oct 2007, 22:36
by jareeq
true is that looks like marginal problem so realy nobody is interested in solution,
beacause it was some time ago after several cheks conversion is the best way so all data in templates page and database use utf-8

chers
jarek

Posted: Fri 12. Oct 2007, 07:44
by Oliver Georgi
update your install using current snapshot release (more stable than 1.3.3 ;-)). This will solve those problems! There was a rendering bug in 1.3.3.

Oliver

Posted: Fri 12. Oct 2007, 17:25
by splette
ahhh, ok. :idea:

Thanks,
Splette

Re: Template modification with polish charset - entities ?

Posted: Wed 11. Mar 2009, 16:40
by dellos
There is still the same problem in newest version and still having problem wyth Polish letters in lat r307 nothing repaired :(

Re: Template modification with polish charset - entities ?

Posted: Wed 11. Mar 2009, 17:22
by dellos
I've looked in to phpMyAdmin, all my DB are in utf8_general_ci after installation I have in config file:

Writing is OK, but the admin backpage has no Polish letters:

$phpwcms['db_charset'] = 'utf8';
$phpwcms['db_collation'] = 'utf8_general_ci';
$phpwcms['charset'] = 'utf-8';

With this the admin backpage has the polish letter but in template bulding has no PL letters:

$phpwcms['db_charset'] = 'utf8';
$phpwcms['db_collation'] = 'utf8_general_ci';
$phpwcms['charset'] = 'iso-8859-1'; or 'iso-8859-2'

Re: Template modification with polish charset - entities ?

Posted: Wed 11. Mar 2009, 18:15
by update
You'd be better off not switching charset / collation while running your system, because the trouble will become even worse

Re: Template modification with polish charset - entities ?

Posted: Thu 12. Mar 2009, 00:24
by dellos
So what to do wyth that ?? the charset of webpage should be iso-8859-2 but when I do something like:

$phpwcms['db_charset'] = 'utf8';
$phpwcms['db_collation'] = 'utf8_general_ci';
$phpwcms['charset'] = 'iso-8859-2';

I'm not getting the polish letters in bulding Template. How to solve that problem ?? Working on 1.2.6 is all ok on my hosting, working on last 1.4.1 r307 is impossible wyth polish letters... HELPPP !!!

Re: Template modification with polish charset - entities ?

Posted: Thu 12. Mar 2009, 17:00
by dellos
I checked all, even the Latin 1 and Latin 2 I couldnt found the sollution for this problem, pleas help me to make the 1.4.1 r307 work on this:

$phpwcms['db_charset'] = 'utf8';
$phpwcms['db_collation'] = 'utf8_general_ci';
$phpwcms['charset'] = 'iso-8859-2';

Maby there is some upgrade of this error that I didn't saw ?? Important Help Needed!

Re: Template modification with polish charset - entities ?

Posted: Fri 13. Mar 2009, 13:01
by Oliver Georgi
You cannot (should) mix those in this way.

I have tested yesterday and I have no problem with UTF-8 and German Umlaute which is (should be) the same for Polish. If you ahve setup a special CSS font - check that this supports your special chars too.

Let us see screenshots - inlcuding screenshot of the source code with that problem.

Oliver