Emad Ha
Emad Ha

Reputation: 1222

Laravel route() parameter UTF-8 issue

I was throwing some arabic characters in the databaes until i was testing the url value of one of my tables and it was returning the encoded value of arabic letters, i checked the database it was fine, however i noticed that the issue was in the route() parameters encoding the values:

route('some.route', 'parmش'); // returns the encoded value 'param%D8%B4'

which made my db queries returns null for that row. the database looks fine and everything else looks fine, except that i cannot find the place to fix that.

i did few more tests like

url('ش'); // was fine

Help!

Upvotes: 2

Views: 836

Answers (1)

Emad Ha
Emad Ha

Reputation: 1222

solved by rawurldecode($value);

Upvotes: 4

Related Questions