Problem with special characters

Asked

Viewed 2,496 times

3

I’m starting to learn about Laravel 5 and I’m having a problem, every text I write with special characters is converted to ''.

I have tried every type of charset configuration from ISO-8859-1 to UTF-8.

There is some way to configure this in the Adjustable so you don’t have to write everything with &; ?

  • It seems to be an error in your editor and not in Laravel. Make sure that the header Content-Type possesses charset=UTF8

  • In the text editor, check the file encoding. For example, in notepadd++ you have to have something like this: Encoding -> Encoding in UTF-8 without BOD

3 answers

1

I didn’t get to use Laravel, but most frameworks have a charset setting (remember also that your bank is recommended to be on the same charset).

This link maybe I can solve your problem

  • I tried this solution but apparently it is some kind of error in the Windows that happens after the parse in the view... I did not succeed :/

  • I’ve had a similar problem because the file charset in sublime was different, I just switched to utf-8 and started working again, maybe it’s a solution.

  • tried it tbm but the sublime charset ja this utf-8 :/

1

Probably the problem is in the Blade Database (Laravel Template System), goes in the file app/Providers/AppServiceProvider.php and leaves the method boot thus =

public function boot()  
{  
    parent::boot();  
    \Blade::setEchoFormat('e(utf8_encode(%s))');  
}  

-1

I decided including the tag

<link href="//fonts.googleapis.com/css?family=Lato:100" rel="stylesheet" type="text/css">

on my Blade master page head.

  • I believe you’ve seen something else for it. How the inclusion of a font can solve this problem?

  • I removed the UTF-8 metacharset and includes the source. But thanks for the negative vote.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.