Unexpected Characters when building
Fresh ptero install with only blueprint and nebula. No files modified.
Used init to create a template for a component, didn't modify anything left everything default. Seems to be encoding all of the files with the name weirdly. All files show as UTF-8 when opened. Tried with a custom name as well, same issue
Fresh install of ubuntu 22.04
NodeJS version v20.18.2
Very confused
18 Replies
Do the files use standard character sets?, they might be utf-8 but if they don't use standard character sets that will most likely still cause issues
Also it could be an issue with CRLF line endings from windows
You could try to dos2unix that file
it's unlikely since it's in the middle of a string but who knows
It does that error for every single file blueprint modifies to build the component.
Tried dos2unix, no luck
VSCode shows the file as LF.
I'm unsure how to check if they don't use standard character sets as that's something I've never modified or come across
whats the locale of your system
That's interesting though
You can use iconv to change it to utf-8
iconv -f ISO-8859-1 -t UTF-8 /var/www/pterodactyl/resources/scripts/blueprint/extends/routers/routes.ts > /var/www/pterodactyl/resources/scripts/blueprint/extends/routers/routes.ts
Should be the commandI'm thinknig the locale not being in
en_US.UTF-8
is the problem. I attempted to switch it but it refuses to do so. One of my nodes correctly shows it as en_US.UTF-8
so I'm going to reinstall ptero over there real quick and see if that fixes it. I'm going to guess it willyep its that
The fact that your locale file doesn't explicitly specify UTF-8 is most likely the problem
Yup that was it, ty for the help.
Very strange I've never come across that before. My 4 22.04 servers locale are all
en_US
and my 2 24.04 servers are en_US.UTF-8
. Attempted to change any of them to en_US.UTF-8
and it wouldn't let me. I don't have a base VM i can throw up to see if it's a 22.04 quirk or not. I'm going to guess the custom image my provider uses is just dumb and I've never come across any issues.You should be able to change that locale stuff using /etc/locale.conf hopefully
Probably an issue with your provider, this is a Ubuntu 22.04 image as provided by hetzner
That's what I figured was going on. No idea why they'd change that
Correction on Ubuntu it'd be
update-locale command or /etc/default/locale
or
dpkg-reconfigure locales
GitHub
ISO-8859-6 locales generate unexpected characters for route variabl...
Issue discovered by @InfraCharm Current Behavior When the system's locale is set to a ISO-8859-6 locale and an extension utilizing the Components.yml routes API is installed, build errors will ...
Issue (and steps to reproduce) have been discovered 2 days ago. Blueprint will in the future warn you when using these locales when installing extensions, and halt installing extensions that require UTF-8-dependent APIs.
In this case the charset according to file is ISO-8859-1
I think it's just an issue with most non UTF-8 charsets
I'll modify the issue title

Didn't even occur to me to check the github issues :heaviersob:
Glad to see you already have a solution in place for the future