Jump to content

Encoding issue


Recommended Posts

Posted

Hello,

I am transferring a PHP fusion forum to IPB.

The problem is like this:

I have set $INFO['sql_charset'] = 'utf8'; in conf_global.php

I have set utf8_lithuanian_ci collation to mysql columns that need to contain lithuanian special characters (ie. in posts table "post" column)

Now everything is working fine. Except when I make a new post, the new post is displayed as having ? instead of the lithuanian special characters, even though in the database it displays the characters correctly.

How to get them to display properly?

BTW. If i remove utf8 from $INFO['sql_charset'] = 'utf8'; all old posts display ? instead of the special characters, but new posts work just fine.

Posted

You may want to create a ticket with IPB for this issue as they may be able to look at it in more detail.

At a first thought, it sounds like the encoding isn't matching. That is, what ipb forum expects vs your server settings. Also, your setting of $INFO['sql_charset'] = 'utf8' maps to expectation of utf8_general_ci or utf8_unicode_ci in mysql, not the utf8_lithuanian_ci which explains why it's breaking but new posts still working.

As a general note, you never really need anything other than general/unicode (the difference of which seems to be getting more blurry with time) in the utf8 (or higher) collation sets. It's because they can still handle all languages whereas other collations like lithuanian will make special arrangements for those special characters, which is kind of legacy property from the older days.

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...