mardi 2 août 2016

How to insert/update accented special characters in laravel

I am trying to insert / update accented special characters through Laravel

like

çã, á, é, í, ó, ú, ü, ñ

and many more.

But laravel is converting into some hex code and insert it into database. Which in return, i am getting content in chinese...

For example:- i am trying to this

enter image description here

Actual query runs in laravel

enter image description here

What shown in blade is

enter image description here

Data type of column is nvarchar and collation is SQL_Latin1_General_CP1_CI_AI

So, what i have conclude is, this is the laravel issue becuase if run query directly in database by prefixing N like

set 'name' = N'Vishal çã, á, é, í, ó, ú, ü, ñ'

then it works fine.

How could we acheive this through laravel ?



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire