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

Nette\Utils\Strings::toAscii doesnt convert ã to ascii character #1535

Closed
reflexator opened this issue Jul 23, 2015 · 5 comments
Closed

Comments

@reflexator
Copy link

Example: joão-marques
Results: joão-marques
Correct result: joao-marques

@xificurk
Copy link
Contributor

@reflexator I'm kind of confused - what are you passing to toAscii method? Text 'joão-marques' is already in ASCII, so Strings::toAscii() will leave it unchanged.

@reflexator
Copy link
Author

So it will not remove diacritic as it says in documentation?

I am little bit confused

echo Strings::toAscii('žluťoučký kůň'); // zlutoucky kun

@reflexator
Copy link
Author

So it looks that it will remove diacritics if you pass string in ASCII, but if you pass in numeric character reference it doesnt remove it.

@xificurk
Copy link
Contributor

@reflexator Yes, it will remove diacritics. You did not answered the question - what are you passing to toAscii method? If the answer is 'joão-marques', then there is nothing to remove, there is no diacritics in that text.

(Hm... Github messes up HTML entities)

@reflexator
Copy link
Author

Yeah I am passing string with numeric reference, my bad, I will close ticket.

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

No branches or pull requests

2 participants