Forums

UTF-8 charset instead of Ansi is needed

BLolka 16 Jun, 2014
Hi,

The data is saved in Ansi charset, and the characters that are not in this table (such as ő and ű) cause problems, furthermore a question mark appears in the pdf instead of these ones.
How can be changed the charset into UTF-8?

Thanks in advance,
Laci
GreyHead 16 Jun, 2014
Hi Laci,

Please check the default Collation settings on your database, that's probably where the problem is.

Bob
BLolka 16 Jun, 2014
Hi Bob,

The collation of the database (as well as the tables) is utf8_general_ci.

Laci
GreyHead 16 Jun, 2014
Hi Laci,

In that case I have no idea - as far as I know there is nothing in ChronoForms that changes the character set.

Bob
BLolka 16 Jun, 2014
Hi Bob,

Though the default charset of TCPDF is UTF-8, the pdf is also created in Ansi.

Have a nice day,
Laci
GreyHead 16 Jun, 2014
Hi Laci,

Maybe your site page is set to ANSI? As I said, as far as I know ChronoForms doesn't change anything about the character set.

Bob
BLolka 17 Jun, 2014
Hi Bob,

The character set of the site is UTF-8, too (of course, because of the Hungarian languege): http://2014.ebszkiallitas.hu/hu/?option=com_chronoforms5&chronoform=Latogatoi_regisztracio.

Have a nice day,
Laci
GreyHead 17 Jun, 2014
Hi Laci,

OK, so the page char set is correct, the form submits in UTF-8 and the thank you page display correctly. I can only suggest that the problem is still with the DB Save / table collation settings?

Bob
BLolka 17 Jun, 2014
Hi Bob,

The collection of the DB is correct, the special charachters are saved correctly.
The pdf is ANSI only (see the attached file).

Laci
GreyHead 17 Jun, 2014
Hi Laci,

I'm now very confused, your original post said that there was a problem with the data saving and didn't mention TCPDF. The PDF you attached looks perfectly OK to me?

What exactly is the problem?

Bob
BLolka 18 Jun, 2014
Hi Bob,

It looks as if it would be perfect. I changed the special characters: ő to õ and ű to û (these are similers, used other langueges, and are in the ANSI table). But in that case these characters are entered into a field, a question mark appears instead of them (see Beosztás: Irodavezet? - the entered data is Irodavezető).
The font encoding of the pdf is Ansi, as well as its language is English.

Have a nice day,
Laci
GreyHead 18 Jun, 2014
Hi Laci,

Ah, I suspect that the problem is with the fonts that TCPDF is using. ChronoForms sets the character set to UTF-8 but the embedded Helvetica fonts both show up as ANSI.

There's a discussion here on StackOverflow; and some information here on the TCPDF site. You can also download more fonts for TCPDF from here. I haven't tested but it looks as though some of those have UTF-8 character sets.

Bob
This topic is locked and no more replies can be posted.