T
TanStack2mo ago
absent-sapphire

SSR build corrupts non-ASCII (UTF-8) characters in JSON imports

Hey! I noticed that when I updated Tanstack Start, I started having hydration mismatches due to a mismatch between the server and the client. After further looking into it, I noticed that some of my hebrew translations are getting corrupted when bundled for SSR. In the server, the characters are corrupted but on the client they remain correct. I am not sure if the issue is indeed with Tanstack start or perhaps vite itself, I couldn't find any way to properly debug this, so I'd love to know if there's anything I can do to pinpoint it. Versions:
"@tanstack/react-query": "^5.66.5",
"@tanstack/react-router": "^1.132.0",
"@tanstack/react-router-ssr-query": "^1.131.7",
"@tanstack/react-start": "^1.132.0",
"@tanstack/router-plugin": "^1.132.0",
"@tanstack/react-query": "^5.66.5",
"@tanstack/react-router": "^1.132.0",
"@tanstack/react-router-ssr-query": "^1.131.7",
"@tanstack/react-start": "^1.132.0",
"@tanstack/router-plugin": "^1.132.0",
Expected behavior: Both server and client should render the same UTF-8 text Actual: Server renders with replacement characters (�) Thanks!
1 Reply
stormy-gold
stormy-gold2mo ago
can you please provide a complete reproducer project?

Did you find this page helpful?