Skip to content

nonascii characters in filename doesn't work in Unity #18

@choigawoon

Description

@choigawoon

In .Net 8.0, works perfectly. but not in Unity.

here's my reproduction sample.
https://github.com/choigawoon/test-unity-synology-api

open Assets/Scens/TestScene and click play after inserting infos.
image


Something`s broken when doing this code.

headerValue = bytes.Aggregate("", (current, b) => current + (char) b);

In .Net 8.0

headerValue:
"form-data; name="file"; filename="ìµ\u009cê°\u0080ì\u009a´_H2_RIGHT_STAGE 2 - 2_20231220_234457_640x360.mp4"; filename*=UTF-8''%EC%B5%9C%EA%B0%80%EC%9A%B4_H2_RIGHT_STAGE%202%20-%202_20231220_234457_640x360.mp4"

In Unity

headerValue:
"form-data; name="file"; filename="���_H2_RIGHT_STAGE 2 - 2_20231220_234457_640x360.mp4"; filename*=UTF-8''%EC%B5%9C%EA%B0%80%EC%9A%B4_H2_RIGHT_STAGE%202%20-%202_20231220_234457_640x360.mp4"

Metadata

Metadata

Assignees

No one assigned

    Labels

    help wantedExtra attention is needed

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions