question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Formdata Spanish accents or other special characters don't show up as one would expect

See original GitHub issue

Describe the bug

When creating fomData with name fields with accents such as the word “Género”, when parsing in the server it shows up as garbled text such as “Género”. I believe the the behavior would be that it would show up as “Género”, but please correct me if I am wrong.

Reproduction

Link to the reproduction below in the following repo: https://github.com/luthfib/sveltekit-bug-repro. I created a minimal sveltekit repo that has two input fields and a submit button using use:enhance. Once the data is submitted I have. validate action that receives it and upon inspecting the data in the server it can be seen that the characters are not encoded as one would expect.

Logs

No response

System Info

System:
    OS: macOS 13.0.1
    CPU: (8) arm64 Apple M1 Pro
    Memory: 98.81 MB / 16.00 GB
    Shell: 5.8.1 - /bin/zsh
  Binaries:
    Node: 18.4.0 - ~/.nvm/versions/node/v18.4.0/bin/node
    npm: 8.13.2 - ~/.nvm/versions/node/v18.4.0/bin/npm
  Browsers:
    Brave Browser: 98.1.35.101
    Chrome: 107.0.5304.110
    Firefox: 107.0
    Safari: 16.1
  npmPackages:
    @sveltejs/adapter-auto: next => 1.0.0-next.89 
    @sveltejs/kit: next => 1.0.0-next.563 
    svelte: ^3.44.0 => 3.53.1 
    vite: ^3.1.0 => 3.2.4

Severity

annoyance

Additional Information

No response

Issue Analytics

  • State:closed
  • Created 10 months ago
  • Comments:8 (7 by maintainers)

github_iconTop GitHub Comments

3reactions
repsac-bycommented, Nov 28, 2022
1reaction
Conduitrycommented, Dec 8, 2022

@sveltejs/kit@1.0.0-next.575 include the update to undici@5.14.0, so this should be fixed now.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Encoding problems when using multipart/form-data - Forums
I have a form that allows file uploads, but the form also contains some plain text input fields. The problem is, when the...
Read more >
Spanish Characters not Displaying Correctly - Stack Overflow
PHP ini has default_charset setting it should be utf-8 if you do not have access to it use ini_set('default_charset', 'utf-8');.
Read more >
Spanish accent letters not showing properly when form is ...
I've been working on a form all morning. It's in Spanish and it seems that when I save it, certain characters such as...
Read more >
DT doesn't allow accents and spanish character
We have a big problem with spanish accent and special characters using Data Transformation (HL7 Messages). We have some DT to transform HL7 ......
Read more >
Character Conversions from Browser to Database - Oracle
The following image shows a possible display when you do not provide any character encoding information to the browser. In this case, characters...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found