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

[Bug] Scandinavian letters in name format #1280

Closed
MrWhiteFIN opened this issue Jan 13, 2024 · 8 comments
Closed

[Bug] Scandinavian letters in name format #1280

MrWhiteFIN opened this issue Jan 13, 2024 · 8 comments
Assignees
Labels
bug Something isn't working

Comments

@MrWhiteFIN
Copy link

When creating a character it doesn't allow characters Ö, Ä and Å which are used, for example, in Finnish.

@MrWhiteFIN MrWhiteFIN added the bug Something isn't working label Jan 13, 2024
@MrWhiteFIN MrWhiteFIN changed the title [Bug] Nordic letters in name format [Bug] Scandinavian letters in name format Jan 13, 2024
@Gellipapa
Copy link
Contributor

@MrWhiteFIN Hi! By default, UTF-8(Full Unicode set not supported.) is not supported by lua, so we can't do it for you.

Alternatively, we can suggest you to type this regex expression and you will be able to use it, but we can't publish it, you have to type it yourself.

Look for this code in your script and replace it with the one I sent after a script restart and it will accept the characters in your name.

https://github.com/esx-framework/esx_core/blob/main/%5Bcore%5D/esx_identity/server/main.lua#L73C23-L73C23

local function checkAlphanumeric(str)
    return (string.match(str, "[^a-zA-ZáéíóöőúüűÁÉÍÓÖŐÚÜŰÄäÖöÅåÆæØø]"))
end

Of course, if a character is left out, you will have to replace it yourself by entering the character fields at the end of the list above.

@Gellipapa Gellipapa moved this from 🆕 New to 📋 Awaiting feedback in ESX Legacy Roadmap Jan 16, 2024
@MrWhiteFIN
Copy link
Author

@MrWhiteFIN Hi! By default, UTF-8(Full Unicode set not supported.) is not supported by lua, so we can't do it for you.

Alternatively, we can suggest you to type this regex expression and you will be able to use it, but we can't publish it, you have to type it yourself.

Look for this code in your script and replace it with the one I sent after a script restart and it will accept the characters in your name.

https://github.com/esx-framework/esx_core/blob/main/%5Bcore%5D/esx_identity/server/main.lua#L73C23-L73C23

local function checkAlphanumeric(str)
    return (string.match(str, "[^a-zA-ZáéíóöőúüűÁÉÍÓÖŐÚÜŰÄäÖöÅåÆæØø]"))
end

Of course, if a character is left out, you will have to replace it yourself by entering the character fields at the end of the list above.

Hi, thanks for replying,

Unfortunately, that code didn't fix the problem. It still doesn't allow the characters. Can some else script (multichar? database?) cause this?

😀😀

@Gellipapa
Copy link
Contributor

@MrWhiteFIN Hi! Any error? Server or client side?

@MrWhiteFIN
Copy link
Author

@MrWhiteFIN Hi! Any error? Server or client side?

No errors. It just says "Please match the requested format" below the name text block.

@Gellipapa
Copy link
Contributor

@MrWhiteFIN Hi! Any error? Server or client side?

No errors. It just says "Please match the requested format" below the name text block.

This is interesting because it returns the result it should work on. I'll try it in a moment.

@Gellipapa
Copy link
Contributor

image
Ohh this is frontend problem :)

@MrWhiteFIN
Copy link
Author

image Ohh this is frontend problem :)

What do you mean by that and how can I fix it?

@Gellipapa
Copy link
Contributor

image
Working!

You need open esx_identity/html/index.html file and

pattern="[a-zA-ZáéíóöőúüűÁÉÍÓÖŐÚÜŰÄäÖöÅåÆæØø]*"

copy and replace currently pattern

image

blue part remove and pattern="[a-zA-ZáéíóöőúüűÁÉÍÓÖŐÚÜŰÄäÖöÅåÆæØø]*" this pattern. Like a photo.

@github-project-automation github-project-automation bot moved this from 📋 Awaiting feedback to ✅ Done in ESX Legacy Roadmap Jan 17, 2024
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
Status: Done
Development

No branches or pull requests

3 participants