Author Topic: charset problem in 1.7.2  (Read 14056 times)

0 Members and 1 Guest are viewing this topic.

Offline Bugfixed

  • Jr. Member
  • **
  • Posts: 96
    • View Profile
    • Lavinya
charset problem in 1.7.2
« 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:
« Last Edit: March 04, 2006, 12:17:25 PM by Bugfixed »
<?php echo 'Hello, World!'; ?>

Offline Kichus

  • Pre-Newbie
  • Posts: 4
    • View Profile
    • www.kichus.net
Re: charset problem in 1.7.2
« Reply #1 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.
K i c h u s

Offline Patti666

  • Pre-Newbie
  • Posts: 2
    • View Profile
Re: charset problem in 1.7.2
« Reply #2 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

Offline IcEcReaM

  • Hero Member
  • *****
  • Posts: 714
    • View Profile
    • My little Testboard
Re: charset problem in 1.7.2
« Reply #3 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.
Coding is a everlasting competition between programmers who tries to write larger, better and idiot-safe programs and the universe producing larger and stupider idiots...
...so far the universe won
bump

Offline Kichus

  • Pre-Newbie
  • Posts: 4
    • View Profile
    • www.kichus.net
Re: charset problem in 1.7.2
« Reply #4 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.
K i c h u s

Offline IcEcReaM

  • Hero Member
  • *****
  • Posts: 714
    • View Profile
    • My little Testboard
Re: charset problem in 1.7.2
« Reply #5 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.
Coding is a everlasting competition between programmers who tries to write larger, better and idiot-safe programs and the universe producing larger and stupider idiots...
...so far the universe won
bump

Offline Kichus

  • Pre-Newbie
  • Posts: 4
    • View Profile
    • www.kichus.net
Re: charset problem in 1.7.2
« Reply #6 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.
K i c h u s

Offline Bugfixed

  • Jr. Member
  • **
  • Posts: 96
    • View Profile
    • Lavinya
Re: charset problem in 1.7.2
« Reply #7 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:
<?php echo 'Hello, World!'; ?>

Offline Jan

  • Administrator
  • 4images Guru
  • *****
  • Posts: 5.024
    • View Profile
    • 4images - Image Gallery Management System
Re: charset problem in 1.7.2
« Reply #8 on: March 08, 2006, 03:32:50 PM »
Try the fix i attached to this post. Just replace the files in the zip-file.
« Last Edit: March 09, 2006, 10:12:57 AM by Jan »
Your first three "must do" before you ask a question:
1. Forum rules
2. FAQ
3. Search

Offline Bugfixed

  • Jr. Member
  • **
  • Posts: 96
    • View Profile
    • Lavinya
Re: charset problem in 1.7.2
« Reply #9 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.  :)
<?php echo 'Hello, World!'; ?>