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

Use multibyte-safe case convertion #78

Merged
merged 1 commit into from
Oct 2, 2015
Merged

Conversation

Koc
Copy link
Contributor

@Koc Koc commented Oct 2, 2015

No description provided.

florianeckerstorfer pushed a commit that referenced this pull request Oct 2, 2015
Use multibyte-safe case convertion
@florianeckerstorfer florianeckerstorfer merged commit d3afa29 into cocur:master Oct 2, 2015
@florianeckerstorfer
Copy link
Member

Did you encounter any problems because strtolower() was used? In theory this should not matter because the rules are applied first and there should only be ASCII characters in the string at this point.

@Koc
Copy link
Contributor Author

Koc commented Oct 2, 2015

It doesn't works correctly for russian slugs that used utf-8

@florianeckerstorfer
Copy link
Member

Ok, because the Russian characters are not transliterated?

@Koc
Copy link
Contributor Author

Koc commented Oct 2, 2015

As you see from transliteration rules we should duplicate rules for capital and small letters

'Щ' => 'Shch',
'щ' => 'shch',

It is ok, but when we add rules for 2 charachters, like

<call method="addRule">
    <argument>ый</argument>
    <argument>yi</argument>
</call>
<call method="addRule">
    <argument>дж</argument>
    <argument>j</argument>
</call>

it is so hard, because we should add rules for дж, ДЖ, Дж etc

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.

2 participants