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

str_slug function ascii character problem #11619

Closed
ozgurkaragoz opened this issue Dec 30, 2015 · 6 comments
Closed

str_slug function ascii character problem #11619

ozgurkaragoz opened this issue Dec 30, 2015 · 6 comments

Comments

@ozgurkaragoz
Copy link

Hi,

I have a problem with ascii characters on laravel 5.2.5 (in Turkish)

(I know 5.2 don't use Stringy)

str_slug('özgür karagöz') => 'oezguer-karagoez'

it must be;

str_slug('özgür karagöz') => 'ozgur-karagoz' (laravel 5.1)

For example in Turkish Language:

'Ö' => 'O',
'ö' => 'o',

in German or etc

'Ö' => 'OE',
'ö' => 'oe',

@GrahamCampbell
Copy link
Member

What does laravel 5.1 do with the latest version of stringy?

@GrahamCampbell
Copy link
Member

5.2 does use stringy's code. We just copied over the small part of stringy we actually needed and dropped the dependency.

@ozgurkaragoz
Copy link
Author

Laravel 5.1 Stringy Version: "danielstjules/stringy": "~1.8"

Actually, this problem Stringy's problem too :)

The latest version of danielstjules/stringy same problem too.

Slugify method must run by locale.

@GrahamCampbell
Copy link
Member

Ok then, consider this a breaking change then, but not a bug.

@GrahamCampbell
Copy link
Member

If you would like this changed, please send a PR to stringy, and we'll update our code to match what they do each time then tag a release.

@blackfyre
Copy link

@ozgurkaragoz You can refer to my blog article on how to fix this issue: https://blackfyre.ninja/blog/fixing-slug-generation-problems

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

3 participants