Characther reencoding.

Hi,

Evaluating to use suitecrm for my business, I setup an example server using the en_GB language pack,
and I chose for default character Set for import and export UTF-8, as well as the collation as utf8_general_ci.
When trying to store any new data, like, for instance, the euro symbol, or any tilde characther(for ex. é), the
data stored in the database is different, and displayed in a different way in suitecrm(€ comes € and é
comes é). Mariadb is using utf8_general_ci, and I enforced the db to have these characters and collations,
so no wonder why this gets re-encoded.

Any help appreciated.

Thanks!

I don’t know the answer, but since nobody is helping you anyway - have you tried looking into encoding options of PHP?

I know in php.ini you define timezones, mbstring encodings, maybe some other details that could explain your weird behavior…

1 Like

Basically my php.ini is more or less what is the default in Gentoo, adding the localization to Finland.
In this file I would suspect there is something wrong in mbstring config, as I have some other applications
like groupoffice that doesn’t use mbstrings and work correctly with the same config. Here the section:

[mbstring]
mbstring.language = all
mbstring.internal_encoding = UTF-8
mbstring.http_input = auto
mbstring.http_output = UTF-8
mbstring.encoding_translation = On
mbstring.detect_order = UTF-8
mbstring.substitute_character = none
mbstring.func_overload = 0

Thanks for the help!

Correction: groupoffice does use mbstring, I just happen to recheck and I learnt it.

Be warned: I really don’t know anything about PHP localization, I’m just Googling around and asking questions…

In php.ini, do you have any definitions for

default_charset
input_encoding
output_enconding

1 Like

No probs, better some googling than no suggestion at all, so please, go ahead.

The only value set is the default_charset to UTF-8, the rest are commented, however,
it doesn’t seem to me this is wrong, as what I think it’s happening here is that we are
receiving UTF8 chars, thinking they are not, and reencoding them producing the garbage.

I tend to think this might be my doing thinking I have to set things up before the installation
begins and I did something I shouldn’t in that stage that it’s botching the result, I’ll drop
the database and reinstall a couple of times to see where I get.

Thanks!

Hi,

I just tried the git version setting the following mbstring option to off and it worked:

mbstring.encoding_translation = Off

I hope that saves some headhaches to other people.

José.

1 Like