Ensure your layout template starts something like this:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
If the above is true, then does the "Österreich" come from the database? If that's the case, you need to ensure that your database encoding is also UTF-8.
Another point... If you use htmlentities to output data, make sure it looks like this:
htmlentities($str, ENT_QUOTES, "UTF-8");
Good luck.
Hy, also make sure that your IDE is creating your files with the current settings. Komodo edit drove me mad once on this, because it was creating the new files with the wrong charset.
Thx, but unfortunately nothing changed.
The sick thing is - the data out of the database is displayed correctly. Only the written text directly in the view file is the problem...
mrohrboeck said:
Thx, but unfortunately nothing changed.
The sick thing is - the data out of the database is displayed correctly. Only the written text directly in the view file is the problem...
That kinda points to it being a file encoding issue.
Download Notepad++ and open your files in it. On the top menu is "Encoding" - set this to "Encode in UTF-8 without BOM" and then save the files.
I know this is a super old thread, but I just had this issue also. Tried what sitesense said, but for me I had to "Convert to UTF-8 without BOM" ! Finally no more symbols! Thanks for the right direction!
I'm facing the same problem here. Is there a way to override the escape method from blade? I think blade is running htmlentities() in all my strings, but I must run htmlentities($striong, 'UTF-8') instead of. May anyone help me please?
Sorry for bumping up old thread but I am also experiencing problems with this! Would be awesome to find a solution!
I too have done the <meta> tag thing and also I've checked my texteditor which is not the problem and has never been the problem before either. Using notepad++ and sublime.
The closest I've gotten to an answer is Blade::setEchoFormat('e(utf8_encode(%s))') but I am not sure where to put this yet!
Jsal said:
Sorry for bumping up old thread but I am also experiencing problems with this! Would be awesome to find a solution!
I too have done the <meta> tag thing and also I've checked my texteditor which is not the problem and has never been the problem before either. Using notepad++ and sublime.
The closest I've gotten to an answer is Blade::setEchoFormat('e(utf8_encode(%s))') but I am not sure where to put this yet!
I believe you need to put
\Blade::setEchoFormat('e(utf8_encode(%s))');
in your app/Providers/AppServiceProvider.php file, boot method.
I had this problem with a project that uses a pre-existing mssql database, and I was bumping my head over this. I ended up finding a solution that is to put:
'characterset' => 'utf8',
instead of 'charset'=>'utf8', in database.php file, in the corresponding connection (sqlsrv) (my database has a SQL_Latin1_General_CP1_CI_AS collation).
edited
I need to add, that I was trying to understand what actually worked to solve my issue, as I tried many things, so I undid all the 'solutions', and it's working neverthless, so I'm lost again...
My problem was solved by using:
\Blade::setEchoFormat('e(utf8_decode(%s))');
\Blade::setEchoFormat('e(utf8_decode(%s))'); use id in app/Providers/AppServiceProvider.php file, boot method.
\Blade::setEchoFormat('e(utf8_decode(%s))');
Not worked for me.
{{ trans('features.verify') }} should show Überprüfen but showing nothing
Please help
Bro if you are using PHPStorm try this: File / Settings/ Editor / File Encodings select "UTF-8" on IDE Encoding y Project Encoding.
That fixed the problem. No need of \Blade::setEchoFormat('e(utf8_decode(%s))'); in my case
garimagoyal said:
\Blade::setEchoFormat('e(utf8_decode(%s))');
Not worked for me.
{{ trans('features.verify') }} should show Überprüfen but showing nothing
Please help
I was experiencing the same problem with data from Sybase/SQLServer, and this worked for me:
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community