Skip to content

[🐛 BUG] file selector cannot keep original file name if it contains non-ASCII characters (e.g. chinese characters) #2720

@lee19840806

Description

@lee19840806

🔍 What went wrong?

I upload a file using the file selector, if the file name contains non-ascii characters (for example, chinese characters), then all the non-ascii characters are removed from the file name. But I still want to get the original file name.

steps to reproduce the bug:

  1. create a file selector
  2. upload a file named "abc_变量分析_jf_356.xlsx"
  3. get the file name from the "content" property, the file is renamed to "abc__jf_356.xlsx", all the non-ascii letters are removed.

How can I get the original file name?

✅ Expected Behavior

upload a file named "abc_变量分析_jf_356.xlsx", and I get the file "abc_变量分析_jf_356.xlsx" keeping all the non-ascii characters.

🔄 Steps to Reproduce

  1. create a file selector
  2. upload a file named "abc_变量分析_jf_356.xlsx"
  3. get the file name from the "content" property, the file is renamed to "abc__jf_356.xlsx", all the non-ascii letters are removed.

💻 Runtime Environment

Ubuntu 24.04, Microsoft Edge latest

🌐 Browser (if applicable)

Microsoft Edge

🖥️ Operating System

Linux

📦 Taipy Version

4.1.0

📋 Additional Context (Optional)

📜 Code of Conduct

  • I have checked the existing issues to avoid duplicates.
  • I am willing to work on this issue (optional)

✅ Acceptance Criteria

  • A reproducible unit test is added.
  • Code coverage is at least 90%.
  • The bug reporter validated the fix.
  • Relevant documentation updates or an issue created in

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions