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

Doesn't work with Central Europe characters #24

Open
rivatnt2 opened this issue Jan 30, 2015 · 4 comments
Open

Doesn't work with Central Europe characters #24

rivatnt2 opened this issue Jan 30, 2015 · 4 comments

Comments

@rivatnt2
Copy link

I love this idea but I can't use words I need. When I use word with characters like č or š, it won't save in experimenter tool. Can you please help me?

@mickeypash
Copy link

Hey there, I haven't tested this out for myself but I think it is worth a try.
In the experimenter.php file change iso-8859-1 to utf-8. see here

<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
6   <link type="text/css" href="core/css/overcast/jquery-ui-1.8.18.custom.css" rel="stylesheet" />

Source 1
Source 2

@rivatnt2
Copy link
Author

I have tried this in first place.. With utf-8 I can write characters into columns (it will show them, not just ?) but won't save anything. Even no error message appear.

@atakanyenel
Copy link

Could anyone find a solution for this problem ? I'm using non-english characters(Turkish) and my Developer Tools gives the following error


{"images":{"tabs1":"","tabs2":"","tabs3":"","tabs4":""}, "errors":"<li class='error-item'>Please input a valid category label for Category A </li><li class='error-item'>The text input, 'Yüreklendiren' in Category A is not valid. </li>

and goes on for all non-english characters, which makes it impossible to save.

@hermannschwaerzlerUIBK
Copy link

Hi Atakan,

I think I found a solution. Change core/fileManager.php line 291 from
else if ( preg_match("/[^A-Za-z0-9\-\(\)\$\#\@\? ]+/", $form["cat".$catnames[$i-1].$j."-txt"]))
to
else if ( preg_match("/[^\p{L}\p{N}\-\(\)\$\#\@\? ]+/u", $form["cat".$catnames[$i-1].$j."-txt"]))
That is: make that regex UTF-8 aware (/u at the end) and use the Unicode character classes for letters and numbers (\p{L} and \p{N}) which include non-ascii variants of those (see http://stackoverflow.com/a/8347715). That works for me (german umlauts). Does it work for you as well?

Greetings
Hermann

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

4 participants