When you copy a URL containing Unicode characters from the address bar and then, for example, paste it into a chat message - all the unicode characters are now encoded - ruining your nice 'readable' URL.
A lot of the good slug libraries cope with this to varying extents by trying to keep the slug to the standard latin alphabet. Obviously this makes the libraries quite complex as simple character substitutions are not enough when working with languages that use entirely different glyphs (e.g Thai - ΰΈͺΰΈ§ΰΈ±ΰΈͺΰΈΰΈ΅) - transliteration is required.
βItβs only work if somebody makes you do it.β β’ craft code β’ creative ideas β’ cutting edge β’ author β’ senior front end architect β’ professional scuba diver β’ adventures above and below the sea level
Location
Germany
Work
Senior Front End Architect, Full Stack Engineer, Creative Technologist and Scuba Diving Professional
Well, a full fledged library is beyond the scope of "these one line functions" :D I'll add a disclaimer that it should be used with the standard latin alphabet.
Thank you for your time,
Martin
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
When you copy a URL containing Unicode characters from the address bar and then, for example, paste it into a chat message - all the unicode characters are now encoded - ruining your nice 'readable' URL.
A lot of the good slug libraries cope with this to varying extents by trying to keep the slug to the standard latin alphabet. Obviously this makes the libraries quite complex as simple character substitutions are not enough when working with languages that use entirely different glyphs (e.g Thai - ΰΈͺΰΈ§ΰΈ±ΰΈͺΰΈΰΈ΅) - transliteration is required.
Well, a full fledged library is beyond the scope of "these one line functions" :D I'll add a disclaimer that it should be used with the standard latin alphabet.
Thank you for your time,
Martin