4images Forum & Community

4images Issues / Ausgaben => Discussion & Troubleshooting => Topic started by: Sleepy on February 01, 2008, 04:06:49 PM

Title: Some words(Chinese) cannot be shown properly in 1.7.5.
Post by: Sleepy 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
Title: Re: Some words(Chinese) cannot be shown properly in 1.7.5.
Post by: nobby 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
Title: Re: Some words(Chinese) cannot be shown properly in 1.7.5.
Post by: Jan 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.
Title: Re: Some words(Chinese) cannot be shown properly in 1.7.5.
Post by: Sleepy 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.
Title: Re: Some words(Chinese) cannot be shown properly in 1.7.5.
Post by: nobby on February 02, 2008, 10:32:05 PM
Hi Sleepy,

I have tried all character encodings, no success  :|

nobby
Title: Re: Some words(Chinese) cannot be shown properly in 1.7.5.
Post by: Sleepy 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.
Title: Re: Some words(Chinese) cannot be shown properly in 1.7.5.
Post by: nobby 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
Title: Re: Some words(Chinese) cannot be shown properly in 1.7.5.
Post by: Sleepy 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.
Title: Re: Some words(Chinese) cannot be shown properly in 1.7.5.
Post by: nobby on February 04, 2008, 08:38:38 AM
 :thumbup:  :wink:
Title: Re: Some words(Chinese) cannot be shown properly in 1.7.5.
Post by: Jan 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
  );
Title: Re: Some words(Chinese) cannot be shown properly in 1.7.5.
Post by: Sleepy 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