Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

True UTF-8 char mapping #4

Merged
merged 1 commit into from Apr 4, 2012
Merged

True UTF-8 char mapping #4

merged 1 commit into from Apr 4, 2012

Conversation

dorogoy
Copy link
Contributor

@dorogoy dorogoy commented Apr 4, 2012

I noticed when using your plugin that plenty of characters where missed and the worst part was that the chars where "translated" only once and ignored after that in future inputs (not even replaced by a dash).

Example 1

  • String: El veloz murciélago hindú comía feliz cardillo y kiwi. La cigüeña tocaba el saxofón detrás del palenque de paja.
  • Result (before): el-veloz-murci-lago-hind-com-a-feliz-cardillo-y-kiwi-la-cigue-a-tocaba-el-saxofon-detr-s-del-palenque-de-paja
  • Result (after): el-veloz-murcielago-hindu-comia-feliz-cardillo-y-kiwi-la-ciguena-tocaba-el-saxofon-detras-del-palenque-de-paja

Example 2

  • String: Le cœur déçu mais l'âme plutôt naïve, Louÿs rêva de crapaüter en canoë au delà des îles, près du mälströn où brûlent les novæ.
  • Result (before): le-c-ur-d-cu-mais-lame-plutot-na-ve-lou-s-reva-de-crapauter-en-cano-au-del-des-iles-pr-s-du-m-lstron-o-brulent-les-nov
  • Result (after): le-coeur-decu-mais-lame-plutot-naive-louys-reva-de-crapauter-en-canoe-au-dela-des-iles-pres-du-malstron-ou-brulent-les-novae

I guess that the plugin is now optimal for west european languages.

The refactored code is adapted from "jQuery Slugify a string!" from Pablo Bandin
http://tracehello.wordpress.com/2011/06/15/jquery-real-slugify-plugin/ (Dual licensed MIT / GPL)

The refactored code is adapted from "jQuery Slugify a string!" from Pablo Bandin
http://tracehello.wordpress.com/2011/06/15/jquery-real-slugify-plugin/

Dual licensed MIT / GPL
@pmcelhaney
Copy link
Owner

Thanks! Yes, this plugin was originally designed for use in a couple of English-only web sites. I'm thrilled that the OSS community has embraced and improved it.

pmcelhaney added a commit that referenced this pull request Apr 4, 2012
True UTF-8 char mapping
@pmcelhaney pmcelhaney merged commit 88ef92e into pmcelhaney:master Apr 4, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants