Topic: UTF-8 display problem

Hi,
I use 1.2 with UTF-8 charset for vietnamese. All HTML headers have :

<meta http-equiv="Content-Type" content="text/html; charset=utf-8">

When I type in TEXTAREA, I see correct characters:
http://people.vnoss.org/~vnpenguin/pub/punbb-unicode-input.png

When I do "Preview" it's ok too:
http://people.vnoss.org/~vnpenguin/pub/punbb-unicode-preview.png

But when I do "Submit" the result was not correct:
http://people.vnoss.org/~vnpenguin/pub/punbb-unicode.png

The following characters have problem:
00E0, 00C1  (See http://www.unicode.org/charts/PDF/U0080.pdf)
1EA0, 1ECF, 1ECD (see http://www.unicode.org/charts/PDF/U1E00.pdf)

With punBB 1.1.5 I have not this problem. All vietnamese UTF-8 characters were correctly presented.

Any ideas for help ?
Thank you in advance,

[no signature]

Re: UTF-8 display problem

what database are you using?

Re: UTF-8 display problem

I used MySQL 3.x. With the same data, the same server I have NO problem with punbb 1.1.5 smile

[no signature]

Re: UTF-8 display problem

Hey, I fixed myself smile
This error comes from the function pun_trim(). So just ignore this function and that's all right wink

[no signature]

Re: UTF-8 display problem

Nice bughunting. I will look at it when I come home from work.

"Programming is like sex: one mistake and you have to support it for the rest of your life."

Re: UTF-8 display problem

Fixed in Subversion.

"Programming is like sex: one mistake and you have to support it for the rest of your life."

Re: UTF-8 display problem

Rickard wrote:

Fixed in Subversion.

Could you tell us more about your solution ?

[no signature]

Re: UTF-8 display problem

You can have a look yourself: http://dev.punbb.org/changeset/15

That's a diff from Subversion. I'm gonna write up a news post about that being available now. Please don't flood this topic with posts about it.

"Programming is like sex: one mistake and you have to support it for the rest of your life."