0

I have my old MySQL database with utf8 and utf8_general_ci - used in CakePHP 2.X. Now, I'm developing new version of my webportal in Symfony 4 (I'm new in Symfony).

Of course I use utf-8 in my template (twig) files.

I've changed Doctrine config file to use mysqli driver (I've found this solution in the internet) and utf8 instead of utf8mb4.

But still I have "?" symbols instead of my national characters such as "ń".

Do you have any idea? Thanks a lot.

EDIT:
I've checked that everywhere I have correct settings: I use utf8 (server, DB server, PHP, files etc.).

  • 2
    when dealing with encoding, there are several places to make sure encoding is set to UTF8 : database, php conf, server conf, file encoding. Did you check all of them ? – VaN Apr 30 '18 at 13:22
  • @VaN thanks. I will check php and server conf. File, database are for sure utf8. – Jakub Mańkowski Apr 30 '18 at 13:30
  • 2
    Possible duplicate of [UTF-8 all the way through](https://stackoverflow.com/questions/279170/utf-8-all-the-way-through) – gp_sflover Apr 30 '18 at 13:36
  • database-wise, there are also multiple things to check : database charset and collation (https://dev.mysql.com/doc/refman/5.7/en/charset-applications.html), but also table columns collation. about your files, make sure your twig files set the charset in the html header, but alos that the files themself are encoded in utf8 (without-bom preferably) – VaN Apr 30 '18 at 13:37
  • @VaN - everything about database and files checked before posting this question – Jakub Mańkowski Apr 30 '18 at 13:41
  • @VaN - I've checked, everywhere I have utf8 – Jakub Mańkowski Apr 30 '18 at 20:15
  • 1
    @JakubMańkowski I don't mean to be cruel, but *some* part of your application is probably claiming it's not utf8. So I advise to check out gp_sflovers link because from experience ... it's probably one of those things. The first and "easy" thing to do is check which charset your browser thinks the page has. – Jakumi Apr 30 '18 at 20:33

0 Answers0