Can't edit files that contain non-ascii characters #405

Closed
opened 2026-02-05 17:33:11 +03:00 by OVERLORD · 3 comments
Owner

Originally created by @Boy132 on GitHub (Aug 13, 2025).

Originally assigned to: @Boy132 on GitHub.

Image Image Image

File to reproduce:
reproduce.txt

Originally created by @Boy132 on GitHub (Aug 13, 2025). Originally assigned to: @Boy132 on GitHub. <img width="268" height="79" alt="Image" src="https://github.com/user-attachments/assets/624c1a5b-2e60-4fdf-bb29-3b486748dada" /> <img width="2559" height="1354" alt="Image" src="https://github.com/user-attachments/assets/87727d21-b84a-4c9c-8f15-d3313938bc95" /> <img width="672" height="350" alt="Image" src="https://github.com/user-attachments/assets/884407ec-8f96-4d09-a581-d3298a9863b2" /> File to reproduce: [reproduce.txt](https://github.com/user-attachments/files/21750069/reproduce.txt)
Author
Owner

@notAreYouScared commented on GitHub (Aug 13, 2025):

This will be addressed when v4 is merged with a change of the file editor to the new filament code editor.

@notAreYouScared commented on GitHub (Aug 13, 2025): This will be addressed when v4 is merged with a change of the file editor to the new filament code editor.
Author
Owner

@rmartinoscar commented on GitHub (Sep 9, 2025):

Image Still happening in v4
@rmartinoscar commented on GitHub (Sep 9, 2025): <img width="1214" height="728" alt="Image" src="https://github.com/user-attachments/assets/fde24926-f438-4068-aa70-10c74070fbfa" /> Still happening in v4
Author
Owner

@lbzepoqo commented on GitHub (Oct 2, 2025):

I'm getting the same issue. It's a cfg file generated from a mod of a game called Squad.

For comparison, I tried testing it with other panels which worked and half-worked.
Other panels
Image
Image

Pelican
Image

I tried searching for it and got this answer which I'm not sure if it's correct or not:

Your file is encoded in UTF-16 (likely UTF-16 LE with BOM). Pelican’s file viewer is assuming UTF-8 and tries to shove the raw bytes into JSON. The embedded NUL bytes in UTF-16 blow up the JSON parse (“Unexpected end of JSON input”). Pterodactyl’s default editor handles the encoding; your custom theme half-handles it, so you see the “pink blocks” (classic UTF-16 viewed as UTF-8).

SquadAdminTool.zip

@lbzepoqo commented on GitHub (Oct 2, 2025): I'm getting the same issue. It's a cfg file generated from a mod of a game called Squad. For comparison, I tried testing it with other panels which worked and half-worked. Other panels <img width="2362" height="1318" alt="Image" src="https://github.com/user-attachments/assets/28ba7d8f-357d-4f10-bd44-8342fa2fdb0f" /> <img width="1975" height="983" alt="Image" src="https://github.com/user-attachments/assets/39e5bc5f-cebe-40a8-a673-fe000bd224c9" /> Pelican <img width="2355" height="1343" alt="Image" src="https://github.com/user-attachments/assets/f234c96c-4eef-4630-8107-9a47fe61d4ac" /> I tried searching for it and got this answer which I'm not sure if it's correct or not: > Your file is encoded in UTF-16 (likely UTF-16 LE with BOM). Pelican’s file viewer is assuming UTF-8 and tries to shove the raw bytes into JSON. The embedded NUL bytes in UTF-16 blow up the JSON parse (“Unexpected end of JSON input”). Pterodactyl’s default editor handles the encoding; your custom theme half-handles it, so you see the “pink blocks” (classic UTF-16 viewed as UTF-8). [SquadAdminTool.zip](https://github.com/user-attachments/files/22665231/SquadAdminTool.zip)
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/panel-pelican-dev#405