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

Problem with combining characters #275

Closed
lostfocus opened this issue Oct 27, 2020 · 2 comments
Closed

Problem with combining characters #275

lostfocus opened this issue Oct 27, 2020 · 2 comments

Comments

@lostfocus
Copy link

When trying to debug #274 I ran into a weird-ish problem. I got a string from a source that looked like a "normal" unicode string with two German umlauts, but it turned out to use Combining Characters (This StackOverflow question sent me down the right path in the end: Strange umlaut encoding on file system)

I'm not too sure if it's within the scope of this library to handle these kinds of characters, but I thought I'd put this information here anyway, in case someone else has the problem.

@ausi
Copy link

ausi commented Oct 27, 2020

If you have the intl extension installed on your system you can use the Normalizer class to fix that issue:

$this->slugify->slugify(
	\Normalizer::normalize(
		"Erla\xCC\x88uterungsbroschu\xCC\x88re"
	)
);

@florianeckerstorfer
Copy link
Member

@lostfocus Interesting. I think it should be possible to add the German umlauts with combining characters to the ruleset and it should work. But I have not tried that out.

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