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

The name of Custom Field does not support Chinese characters #61

Open
apsonandtesla opened this issue Nov 3, 2020 · 5 comments
Open
Labels
bug Something isn't working

Comments

@apsonandtesla
Copy link

Hi I just found out that when creating custom fields, the name of that field seems not supporting Chinese characters, as when I set the name in Chinese, it will not show up neither in management page nor in card.

I am not sure if this only happens to Chinese or it happens to all non-latin characters.

@creecros creecros added the bug Something isn't working label Nov 5, 2020
@neotaburiss
Copy link

Hello, new to Github, but my team have been using Kanboard & MetaMagik for nearly 3 month and found it very useful.
Since now custom fields do not support Chinese and non-latin characters, we can only input English, that cuase some misunderstanding/errors on different field. so we would ask if any chance to repair that? just thinking this bug may be related to UTF-8 encoding.

@creecros
Copy link
Owner

creecros commented Feb 6, 2021

it's the preg_replace's. if you remove them, there are no restrictions. they were in the original unused code from metadata manager plugin, and I have no idea why. it's really just a matter of me remembering to fix it next time I get a chance, I actually did once, but forgot to send the commit.

it happens here in this method:

private function fixHumanName($human_name = '')

should probably be something like this instead:
preg_replace("![^\p{L}\p{N}\s]!", "", $search);

@neotaburiss
Copy link

it's the preg_replace's. if you remove them, there are no restrictions. they were in the original unused code from metadata manager plugin, and I have no idea why. it's really just a matter of me remembering to fix it next time I get a chance, I actually did once, but forgot to send the commit.

it happens here in this method:

private function fixHumanName($human_name = '')

should probably be something like this instead:
preg_replace("![^\p{L}\p{N}\s]!", "", $search);

Many thanks for your update, it now works great.

@creecros
Copy link
Owner

creecros commented Feb 9, 2021

That didn't work for me at all, I had to remove the lines completely.

@creecros
Copy link
Owner

creecros commented Feb 9, 2021

If someone smarter than me can figure out the correct preg_replace, i will be happy to update the code in a PR. until then, just remove the lines if you need to get around this. I'll leave the issue open.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants