Open asentner opened 9 years ago
Yes probably - let me take a look and find out what's going on.
Matt
My first test was to try to output some utf-8 encoded characters from a controller using krumo.
Seemed to work fine:
Is the encoding on your web page lined up with the encoding of the content being outputted?
For example, something like this in your <head> section:
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
Hey,
I do have the meta tag in my header. I am also able to output utf-8 encoded characters from the controller to krumo. All other encoded characters in the template break when I use krumo though. Very weird.
Okay I tried the same thing in a twig template and it worked fine.
{{ krumo("ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõöøùúûüýþÿ") }}
Weird. It's must be something on my project. Just odd encoding works without the Krumo functions. Let me dig in a bit more. I'll update you all and close this out if I can figure it out. Thanks for taking a look!
Solved this by saving the class.krumo.php as UTF-8 WITH BOM (in \vendor\oodle\krumo\class.krumo.php).
If you make a pull request I'll merge it...
On Feb 12, 2015, at 5:31 AM, Pablo Vos notifications@github.com wrote:
Solved this by saving the class.krumo.php as UTF-8 WITH BOM (in \vendor\oodle\krumo\class.krumo.php).
— Reply to this email directly or view it on GitHub https://github.com/oodle/KrumoBundle/issues/5#issuecomment-74070291.
Nice. Will git even detect the file encoding change? I'll try on my fork to see
Great debug tool! Our company has used the dsm() in Drupal for years so we were excited to find a port of that functionality in the Symfony framework.
When I run the krumo function in a controller or in a twig template, it messes up UTF-8 encoding. Also, in the Krumo output, it is outputting a weird character on the initial dropdown. Please see the attached image. I noticed specifically when using special characters on a page, they show up weird when the k() function is used.
Can you update to support unicode?
If you find this issue is with the Krumo library itself, let me know and I'll post the issue in that repo.
Version Info: oodle/KrumoBundle 1.0.2 oodle/krumo 0.5.0 symfony/symfony 2.5.8 twig/twig 1.16.2