Heading broken when in Chinese mode

alexfung

Joined: 2003-10-15
Posts: 17
Posted: Wed, 2003-10-15 09:23

I can get the Chinese interface via browser accept-language but not via user preference. The preference issue can wait. When my gallery switch to Chinese because of my accept-language has zh-tw, the heading generated by albums.php is broken.

I hexedit the generated web page and found that several links are wrong. The character before the "a" tag is 0xA0 instead of 0x20. As a result, the < character of the tag is treated as part of a double byte character, and the tag is rendered as text. In other words, I am reading:

?a id="popuplink_1" target="Edit" href='http://..

on the screen.

Go to alexfung.info/gallery (with zh-tw as your first language) for a look. Logon as id:guest, pwd:guest. The bug only appears when the user has authority to create new albums. The link after "new album" is broken.

Also, notice the "?" at then end of the "Welcome, Guest?".

To summary, logon as guest/guest to alexfung.info/gallery with zh-tw and you can see:

1)"Welcome, Guest?" with a "?"
2) link to new album is ok
3) link to user preference is broken
4) link to logout is ok

Even stranger, when logon as admin,
1)"Welcome, Adminstrator?" with a "?"
2) link to docs is ok
3) link to new album is broken
4) link to manage user is broken
5) link to user preference is ok
6) link to logout is ok

what a pattern.

 
Tim_j
Tim_j's picture

Joined: 2002-08-15
Posts: 6818
Posted: Wed, 2003-10-15 11:30

Hi,

- Which Version of Gallery are you using ?
- With Browser do you use ?
- Whats your Server OS ?
- Can you give us an URL to your Gallery and to a phpinfo file ?

Jens

 
alexfung

Joined: 2003-10-15
Posts: 17
Posted: Wed, 2003-10-15 16:43

gallery 1.4 pl1 tar.gz
IE 6.0 SP1 (full version reads 6.0.2800.1106.xpsp2.030422-1633)
phpinfo at http://www.totalchoicehosting.com/help/info.php
this is provided by my hosting provider, should be the same environment with the server I am on (they have a dozen servers but should be identical). If you want a phpinfo from my domain, pls let me know.
linux-19.7 kernel 2.4.20-19.7smp with Apache/1.3.28
gallery at http://alexfung.info/gallery/
login as guest, password is guest

 
alexfung

Joined: 2003-10-15
Posts: 17
Posted: Fri, 2003-10-31 02:16

any observations?

 
Tim_j
Tim_j's picture

Joined: 2002-08-15
Posts: 6818
Posted: Fri, 2003-10-31 15:36

Hi,

i just visited your site and told my browser to use zh_TW as language.

There is not much to see. Where is the problem ?
That what i see looks okay.

Jens

 
alexfung

Joined: 2003-10-15
Posts: 17
Posted: Fri, 2003-10-31 17:11

Did you log in as "guest"? What I see is (note the "?" and several a tags become "visible"):

1 個相簿,4 份檔案 歡迎光臨, Guest?
[新增相簿]?a id="popuplink_1" target="Edit" href='http://alexfung.info/gallery/user_preferences.php' onClick="javascript:nw=window.open(document.getElementById('popuplink_1').href,'Edit','height=500,width=500,location=no,scrollbars=yes,menubars=no,toolbars=no,resizable=yes');nw.opener=self;return false;">[個人設定] [登出]

 
Tim_j
Tim_j's picture

Joined: 2002-08-15
Posts: 6818
Posted: Fri, 2003-10-31 17:27

AHHH,

i test too much with NS :)
There it works.

In IE i see what you mean.

It seems some quotes are missing.
I will look in the code and solve this.
(today evening, or night)

Jens

 
Tim_j
Tim_j's picture

Joined: 2002-08-15
Posts: 6818
Posted: Fri, 2003-10-31 19:07

Hi,

i was not able to reproduce it here..
So i copied your HTML Output.
After "Guest" are some chars which causes the error.

But they are not from Gallery ...

Is this with every username ?

Jens

 
alexfung

Joined: 2003-10-15
Posts: 17
Posted: Mon, 2003-11-03 04:00

Yes. Every username who can add albums. I saved the web page I am viewing, and hexedit the saved file. I find some 0xA0 just before the "a" tags.

 
alexfung

Joined: 2003-10-15
Posts: 17
Posted: Fri, 2003-11-07 06:16

I created another user:
id: "g2"
pwd: "g22" (because gallery doesn't like 2-char pwd)
same results (as long as I have zh-tw listed first).
http://alexfung.info/gallery

The same also happens on another gallery I created on the same server.

Do you want the admin account or copy of some config files?

 
Tim_j
Tim_j's picture

Joined: 2002-08-15
Posts: 6818
Posted: Fri, 2003-11-07 10:34

It looks fine now ?

And we cant reproduce it.
I tried it in several ways.

Sorry,

Jens

 
alexfung

Joined: 2003-10-15
Posts: 17
Posted: Fri, 2003-11-07 11:49

No, I keep on seeing gibberish. I've tried XP and ME. ME is English ME. XP is English XP with default language set to Traditional Chinese.

Do you want me to send you a screen capture? It is a 32K GIF

 
Tim_j
Tim_j's picture

Joined: 2002-08-15
Posts: 6818
Posted: Fri, 2003-11-07 14:20

I saw the behaviour some days ago on your server.

I copied the html output and found those strange chars.

I have really no idea :((

Jens

 
alexfung

Joined: 2003-10-15
Posts: 17
Posted: Fri, 2003-11-07 15:35

You mean the same doesn't happen on other servers? Is it a problem of my hosting provider or his linux?

 
alexfung

Joined: 2003-10-15
Posts: 17
Posted: Sat, 2003-12-06 18:25

I fixed it myself, although I don't understand why it happened in the first place.

I downloaded the album.php in binary mode. I found several occurance of 0xa0. I changed them to 0x20. Now it works fine.

In the orignal tar, there is no such 0xa0. I don't know whether it was created when I untar it on the server, or during config.