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

Server-side rendering inserts NUL in cyrillic text #8203

Closed
gigobyte opened this issue Dec 3, 2023 · 2 comments
Closed

Server-side rendering inserts NUL in cyrillic text #8203

gigobyte opened this issue Dec 3, 2023 · 2 comments

Comments

@gigobyte
Copy link

gigobyte commented Dec 3, 2023

Reproduction

Cannot be reproduced. Unfortunately I'm creating this issue so that if anyone else encounters the same problem we can work on resolving it, I don't expect much to come out of it as of right now.

Simplified code:

<input placeholder="Всички" />

In reality it's a Mantine TextInput component

System Info

System:
    OS: Linux 5.15 Ubuntu 20.04.6 LTS (Focal Fossa)
    CPU: (20) x64 13th Gen Intel(R) Core(TM) i5-13500
    Memory: 45.54 GB / 62.61 GB
    Container: Yes
    Shell: 5.0.17 - /bin/bash
  Binaries:
    Node: 21.2.0 - ~/.nvm/versions/node/v21.2.0/bin/node
    npm: 10.2.3 - ~/.nvm/versions/node/v21.2.0/bin/npm
  npmPackages:
    @remix-run/css-bundle: 2.3.1 => 2.3.1 
    @remix-run/dev: 2.3.1 => 2.3.1 
    @remix-run/eslint-config: 2.3.1 => 2.3.1 
    @remix-run/express: 2.3.1 => 2.3.1 
    @remix-run/node: 2.3.1 => 2.3.1 
    @remix-run/react: 2.3.1 => 2.3.1 
    @remix-run/server-runtime: 2.3.1 => 2.3.1 
    @remix-run/web-fetch: 4.4.1 => 4.4.1 
    vite: 5.0.2 => 5.0.2

Used Package Manager

npm

Expected Behavior

Cyrillic text is displayed without any intermediate characters.

Actual Behavior

Remix sometimes returns a NUL character. When I revert the node version to 18.10.0 the server returns a NUL but then client-side React removes it. On node 20+ that does not happen. The NUL character is visible when cURLing the page and in the browser. I've been able to see the character in multiple browsers and devices, I'm also able to reproduce it locally by building the app with remix dev and in production.

cURL to a file:
image

Browser:
image

Devtools:
image

@gigobyte
Copy link
Author

gigobyte commented Jan 2, 2024

The issue got resolved on its own, I believe it was related to the Node version, cannot reproduce it on 21.4.0+

@gigobyte gigobyte closed this as completed Jan 2, 2024
@tats-u
Copy link

tats-u commented Oct 17, 2024

@gigobyte If you use React 18.1–18.3, probably facebook/react#31134 (comment)
CJK text (3 bytes in UTF-8 per char) is more likely to be suffered from this bug than Cyrillic (2 bytes) text.

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

No branches or pull requests

3 participants