Mysql - Searching using like does not correctly return unicode characters

0

I have a text editor in my application that writes html formatting to a longtext field. It turns out that when I use the like to return the data it can not find because of the unicode characters generated.

I have this value in the bank (Pasta)

<p>Macarr&atilde;o</p>

Mysql

select * from oficio where integra like '%Macarrão%' LIMIT 1

and it does not return records. How do I decode this value?

    
asked by anonymous 24.04.2017 / 05:06

1 answer

0

In my case I'm using the tinymce editor, I discovered that in your configuration you can enable the option to not record unicode

$scope.tinyMceOptions = {
      init_instance_callback: function(editor) {
        $scope.iframeElement = editor.iframeElement;
      },
      entity_encoding : "raw" //esta opção grava normalmente no banco
};
    
24.04.2017 / 05:47