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

feat(utils): improve normalizeFileName to support Unicode characters #569

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

luoxiaohei
Copy link

This PR improves the normalizeFileName function in the utils package to support Unicode characters. Previously, the function could not correctly handle file names with Unicode characters. This update allows it to correctly replace non-alphanumeric, non-space, non-hyphen, and non-underscore characters in any language with a hyphen.

Changes include:

  • Updating the normalizeFileName function to use a RegExp that supports Unicode characters.
  • Adding tests for normalizeFileName with various Unicode languages.

This enhancement will allow our application to handle file names in any language, improving its usability for non-English users.

- Update the `normalizeFileName` function to use a RegExp that supports Unicode characters
- Add tests for `normalizeFileName` with various Unicode languages
@tdkn
Copy link

tdkn commented Nov 28, 2023

Hi @helloanoop 👋,

Firstly, I would like to express my sincere gratitude 🙏 for developing such an outstanding project.

If possible, we would appreciate it if you could give this Pull Request a higher priority.

Currently, importing data in Postman format is an obstacle for those trying to use Bruno😵‍💫

As a native Japanese speaker,
I am prepared to provide additional support if needed💪

@jmkim0
Copy link

jmkim0 commented Feb 15, 2024

There are more codes that should be changed:

  1. SingleLineEditor autocomplete

  2. Folder names

    .matches(/^[\w\-. ]+$/, 'Folder name contains invalid characters')

    .matches(/^[\w\-. ]+$/, 'Folder name contains invalid characters')

I checked regexes having \w inside, and other regexes seem fine except ones above. (e.g. HTTP headers, URLs)

Another related issue: #1274

@chenll7
Copy link

chenll7 commented May 2, 2024

Is there any plan to merge this branch?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants