Author Topic: Some words(Chinese) cannot be shown properly in 1.7.5.  (Read 10517 times)

0 Members and 1 Guest are viewing this topic.

Offline Sleepy

  • Jr. Member
  • **
  • Posts: 60
    • View Profile
Some words(Chinese) cannot be shown properly in 1.7.5.
« on: February 01, 2008, 04:06:49 PM »
Hello,

I just upgraded my gallery from 1.7.4 to 1.7.5.
However, I found that some words/characters cannot be shown properly in 1.7.5.

I spent some time and found that the problem is includes\functions.php.
If I used functions.php in 1.7.4, those words/characters were correct.

Does anyone how I should fix this (except for using 1.7.4 functions.php)?
Thank you very much.

Best regards,
Sleepy

Offline nobby

  • 4images Guru
  • *******
  • Posts: 2.873
    • View Profile
Re: Some words(Chinese) cannot be shown properly in 1.7.5.
« Reply #1 on: February 01, 2008, 04:11:09 PM »
Version 1.7.5 still has bugs.

See here: http://www.4homepages.de/forum/index.php?topic=20352.0

nobby

Offline Jan

  • Administrator
  • 4images Guru
  • *****
  • Posts: 5.024
    • View Profile
    • 4images - Image Gallery Management System
Re: Some words(Chinese) cannot be shown properly in 1.7.5.
« Reply #2 on: February 01, 2008, 05:20:13 PM »
As far as i can see, nothing changed in functions.php which could cause that error. Can you be more specific, maybe post a link to your gallery.
Your first three "must do" before you ask a question:
1. Forum rules
2. FAQ
3. Search

Offline Sleepy

  • Jr. Member
  • **
  • Posts: 60
    • View Profile
Re: Some words(Chinese) cannot be shown properly in 1.7.5.
« Reply #3 on: February 02, 2008, 09:46:49 AM »
As far as i can see, nothing changed in functions.php which could cause that error. Can you be more specific, maybe post a link to your gallery.
My album is in Chinese.
However, I created a category called "TEST".

In the description of that category, I put
TEST "閃亮" "現在" "過程";

however, it becomes:
TEST "�{亮" "�{在" "過�{"

The three words, "閃, 現, and 程", cannot be shown properly.
Here's the link FYR:
http://album.sleepy.tw/categories.php?cat_id=4

Thank you very much.

Offline nobby

  • 4images Guru
  • *******
  • Posts: 2.873
    • View Profile
Re: Some words(Chinese) cannot be shown properly in 1.7.5.
« Reply #4 on: February 02, 2008, 10:32:05 PM »
Hi Sleepy,

I have tried all character encodings, no success  :|

nobby

Offline Sleepy

  • Jr. Member
  • **
  • Posts: 60
    • View Profile
Re: Some words(Chinese) cannot be shown properly in 1.7.5.
« Reply #5 on: February 03, 2008, 04:38:52 PM »
Hi Sleepy,

I have tried all character encodings, no success  :|

nobby

Thank you very much for your trying.
I don't know what you meant by "no success".
Is it that you tried all the solutions but you couldn't find the solution, or everthing looked fine when you checked my website?

Btw, the character encoding we're using is Chinese (Traditional).

Anyways, I really appreciate. I guess I would either use the 1.7.4.-functions.php (will it cause any problem?) or use some other words/characters to avoid those few words, thanks.

Offline nobby

  • 4images Guru
  • *******
  • Posts: 2.873
    • View Profile
Re: Some words(Chinese) cannot be shown properly in 1.7.5.
« Reply #6 on: February 03, 2008, 04:57:08 PM »
Quote
I don't know what you meant by "no success".

I have tried all the codes

Offline Sleepy

  • Jr. Member
  • **
  • Posts: 60
    • View Profile
Re: Some words(Chinese) cannot be shown properly in 1.7.5.
« Reply #7 on: February 04, 2008, 03:14:40 AM »
Ha, I didn't get what you meant still.
Maybe I am too stupid, sorry.

I know you tried all the codes, and then what happened?
No success means you couldn't see any Chinese character in that webpage, or all the words/characters you saw were correct?

Thank you very very much.
« Last Edit: February 04, 2008, 03:50:00 AM by Sleepy »

Offline nobby

  • 4images Guru
  • *******
  • Posts: 2.873
    • View Profile
Re: Some words(Chinese) cannot be shown properly in 1.7.5.
« Reply #8 on: February 04, 2008, 08:38:38 AM »
 :thumbup:  :wink:

Offline Jan

  • Administrator
  • 4images Guru
  • *****
  • Posts: 5.024
    • View Profile
    • 4images - Image Gallery Management System
Re: Some words(Chinese) cannot be shown properly in 1.7.5.
« Reply #9 on: February 04, 2008, 10:07:41 AM »
This is weird, the chinese characters seem to include the { character.
Fix:

Replace in functions.php

Code: [Select]
$text = str_replace('{', '{', $text);
with

Code: [Select]
  global $site_template;
  $text = preg_replace(
    '='.preg_quote($site_template->start).'([A-Z0-9_]+)'.preg_quote($site_template->end).'=Usi',
    '{\1}',
    $text
  );
Your first three "must do" before you ask a question:
1. Forum rules
2. FAQ
3. Search

Offline Sleepy

  • Jr. Member
  • **
  • Posts: 60
    • View Profile
Re: Some words(Chinese) cannot be shown properly in 1.7.5.
« Reply #10 on: February 04, 2008, 10:21:49 AM »
Thank you very much, Jan.
Although I don't know how it works, it did solve the problem.

Thanks and have a great Chinese New Year :D
« Last Edit: February 05, 2008, 06:26:18 AM by Sleepy »