Illegal characters in URL

Melih
Melih
@melih
8 years ago
198 posts
Hello,

I may have a wrong information about that but shouldn't iconv command at jrCore_url_strings function in util.php transform the illegal characters to a similar character in respect to appearance? If it is like that, it is not doing the function it is supposed to do. It deletes the character instead of transforming it. I can get the thing i need done by using str_replace but shouldn't it supposed to do that without my interference on its own? By the way i may have understood the function completely in a wrong way. :)
updated by @melih: 07/03/16 08:03:48AM
brian
@brian
8 years ago
10,148 posts
Melih:
Hello,
I may have a wrong information about that but shouldn't iconv command at jrCore_url_strings function in util.php transform the illegal characters to a similar character in respect to appearance?

iconv tries to do this, but some characters do NOT have a URL safe character that is associated with them and will be removed instead. Also - rawurlencode cannot encode all characters to be URL safe either, so some may be removed as well.

If you have a URL that you feel it is removing characters from, let me know the URL (both what it is supposed to be and what you're getting) and I can check it out.

Thanks!


--
Brian Johnson
Founder and Lead Developer - Jamroom
https://www.jamroom.net
Melih
Melih
@melih
8 years ago
198 posts
I got over this problem in the beginning with str_replace because before everything i have two different characters in my surname :)

I tried all the letters now, actually i didn't try before all the different characters in my language.

So i realize there is only one letter removing.

"ı" (small letter dotless I)
michael
@michael
8 years ago
7,746 posts
that small i worked as an 'I' in a blog post, I used it in a post that was titled:

hi there ıs this somerhing is this somerhing
and it got output as
hi there ıs this somerhing is this somerhing

From your explanation I expected to get an illegal character warning on save of the blog post.

The resulting URL is:
hi-there-s-this-somerhing-is-this-somerhing

The 'ı' was removed.
Melih
Melih
@melih
8 years ago
198 posts
Same thing happining in the profile URL

For example my name is Melih Yalımlı
I prefer my profile URL will be melih-yalimli

but instead the result is melih-yalml
:)

Not a big problem actually. I can pass this with a str_replace. Dotless ı is not common in the world.

Tags