4images Forum & Community

4images Issues / Ausgaben => Installation, Update & Configuration => Topic started by: Bugfixed on March 04, 2006, 11:11:07 AM

Title: charset problem in 1.7.2
Post by: Bugfixed on March 04, 2006, 11:11:07 AM
hello all.
I updated my gallery 1.7.1 up 1.7.2. after update charset problem  pls help me.
my page charset is iso-8859-9 >turkish
 :cry:
Title: Re: charset problem in 1.7.2
Post by: Kichus on March 04, 2006, 01:15:40 PM
I have the same problem after updating from 1.7 to 1.7.2, natonal characters in category names, etc (things stored in database) are displayed incorrectly.
Title: Re: charset problem in 1.7.2
Post by: Patti666 on March 04, 2006, 02:10:13 PM
I have the same problem too. After updating from 1.7.1.
It is not everywhere. In the login Bereicht, all is correct (Beim nächsten Besuch automatisch anmelden?).
Otherwise "ä ü ö ß" incorrectly are represented.

Perhaps someone knows an advice. 

greetings Patti
Title: Re: charset problem in 1.7.2
Post by: IcEcReaM on March 04, 2006, 07:22:48 PM
It's because the char system or better the handling is changed.
As i see it correctly now it has changed to utf-8 charset,
but it doesn't work proberly.

You have to save your main.php in utf-8 encoded,
and also change in main.php the charset to utf-8 then it should work.
Title: Re: charset problem in 1.7.2
Post by: Kichus on March 05, 2006, 12:43:04 AM
Unfortunately your advice doesn't work.
There's definitely something wrong with the format_text function because when I commented it completely and put this instead:

Code: [Select]
function format_text($text, $html = 0, $word_wrap = 0, $bbcode = 0, $bbcode_img = 0)
 { return htmlspecialchars($text); }

everything was fine. But I'm not sure if this workaround is safe.
Title: Re: charset problem in 1.7.2
Post by: IcEcReaM on March 05, 2006, 01:12:03 AM
yep, the problem is,
that old entries in db are not encoded in utf-8 format.
with a fresh installation of 4images 1.72 my advice should work.
old entries should be converted.
Title: Re: charset problem in 1.7.2
Post by: Kichus on March 05, 2006, 02:20:48 AM
Well, I fixed the problem by changing the line (in functions.php):

Code: [Select]
$trans = get_html_translation_table(HTML_ENTITIES);
into:

Code: [Select]
$trans = get_html_translation_table(HTML_SPECIALCHARS);
I think the original code doesn't work because HTML_ENTITIES table does not support the ISO-8859-2 character set which I use.
Title: Re: charset problem in 1.7.2
Post by: Bugfixed on March 05, 2006, 11:32:49 AM
Well, I fixed the problem by changing the line (in functions.php):

Code: [Select]
$trans = get_html_translation_table(HTML_ENTITIES);
into:

Code: [Select]
$trans = get_html_translation_table(HTML_SPECIALCHARS);
I think the original code doesn't work because HTML_ENTITIES table does not support the ISO-8859-2 character set which I use.

thanks Kichus  :wink:
Title: Re: charset problem in 1.7.2
Post by: Jan on March 08, 2006, 03:32:50 PM
Try the fix i attached to this post. Just replace the files in the zip-file.
Title: Re: charset problem in 1.7.2
Post by: Bugfixed on March 09, 2006, 09:10:44 AM
Try the fix i attached to this post. Just replace the files in the zip-file.

thanks jan for fix.  :)