2

It is converting a readable character to "á‹á‹µ ደንበኛ". I am using "utf-8" for the columns of the table

4
  • make sure in your database config file you have 'charset' => 'utf8mb4', 'collation' => 'utf8mb4_unicode_ci', these. Commented Apr 10, 2019 at 3:17
  • Did you try Database charset utf8 and Database collation utf8_general_ci ? Commented Apr 10, 2019 at 4:59
  • @ChamaraAbeysekara and Harun I tried those, it didn't work Commented Apr 10, 2019 at 11:12
  • You can try following question feedback stackoverflow question Commented Apr 12, 2019 at 11:22

2 Answers 2

3
+25

First make sure as the comments said the database character is set to be utf8mb4_unicode_ci or utf8_general_ci the first charset is for the emojis anyway back to the issue .. make sure that the php files is set to be utf8 too .. by using a modern editor like phpstorm or vscode or sublime .. you might try to use tinker .. by typing php artisan tinker in your terminal window or command line if you're using widows -> then try to add a record in your database with the non-english language then check it again .. if it doesn't convert to this gibberish so the the problem is not with the database charset is with files as I said.

Sign up to request clarification or add additional context in comments.

Comments

0

You should ensure that your .env file has the following attributes:

DB_CHARSET=utf8
DB_COLLATION=utf8

It will force laravel to use this charset and collation on all queries it runs.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.