8

dd($result);

Result:

...
+description: "عند...ترنت."    
+keywords: b"°ó¨Ü¨ü¨ê...ܰ®"
...

+keywords has the letter 'b' in front of the string, description does not have that... What does the 'b' mean? And if it is possible, how can I convert the string?

Btw, this is the result if I var_dump the keywords: string(116) "���,����,�,��,����������,����������,��,��������,�������,������:"

I think it has to do something with charset, i'm using UTF-8.

Dirk Jan
  • 2,355
  • 3
  • 20
  • 38

1 Answers1

11

If you read: https://symfony.com/doc/current/components/var_dumper.html (which is what Laravel is using) you can see:

enter image description here

So the answer is the string is not valid in UTF-8 (I am guessing b stands for binary).

Maybe check if you can detect the encoding if it's something else.

apokryfos
  • 38,771
  • 9
  • 70
  • 114