1

Topic: Char encoding

Fresh install.
database default (MySQL 4.1) has Collation = utf8_general_ci
when I post a message with an accented char (àèìòù, ecc.) the message get trunkated from that letter included.

If I change collation to "latin1_general_ci" the message don't get trunkated but the accented letters become question marks (?).

Any idea?

Ty,
Gabrielli Paolo

Re: Char encoding

And you have set the character encoding in your forums to utf-8?

The collation should not affect this by the way.

Moving to troubleshooting since this is not a bug (PunBB does not support UTF-8).

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

3

Re: Char encoding

I've set nothing.
I've given db's login&pass in the install process to punBB but posting accented letters doesn't work. Seems a bug.
Btw, where I've to set utf-8 for my forum? Can't find the place in the Admin interface. In the lang/X/common.php?

Thank you,
P.

Re: Char encoding

Exactly.

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

5

Re: Char encoding

Rickard wrote:

Exactly.

I've set
'lang_encoding'            =>    'utf-8'
and tried
'lang_multibyte'        =>    false
and also
'lang_multibyte'        =>    true

but nothing happen: the punbb_posts' message get always trunkated.
When I look at the query in the post page before the redirect (stopping the browser, having the debug mode activated), the query seems ok.

As I stated above, if I change the collation to latin1_general_ci, I can read the message except for the accented chars.

Thankyou for the quick support smile

P.
(MySQL 4.1.14, PHP: 4.4.0)

6

Re: Char encoding

Let's add, and sorry for posting too much, that if I see the HTML of the page, I can see
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
but if I ask to Firefox (doing right-click, View Page Info), it tells me iso-8859-1. Hard refreshing and deleting the cache doesn't help.

T.y.,
P

Re: Char encoding

Most likely your webserver is sending the character set header. Try creating a .htaccess file in your forum root containing:

AddDefaultCharset utf-8

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

8

Re: Char encoding

Rickard wrote:

AddDefaultCharset utf-8

Already tried. Doesn't work. But my apache seems ignoring mod_rewrite rules, so maybe it ignores AddDefaultCharset too. I'm going soon to have a deep look.