CubeCoders / AMP

Issue tracking and documentation for AMP
https://cubecoders.com/AMP
207 stars 38 forks source link

[Project Zomboid] Adding Spanish characters breaks welcome message #650

Closed mockdot closed 2 years ago

mockdot commented 2 years ago

Bug Report

System Information

I confirm:

Symptoms

¡Bienvenido a Gamers.cr Project Zomboid, modo Vanilla!Para interactuar con el panel de chat: presiona Tab, T, o Enter.Usando tab cambiarás el tipo de chat en el que podrás hablar.Chat global: /allChats locales: /say,/yellChats especiales: /whisper, /safehouse, /faction.Presiona la flecha arriba para ver tu historial de mensajes. Presiona el ícono de rosca para personalizar tu chat.¡Que sobrevivas mucho!

Reproduction

Add server description using ¡ or ó, í, á, etc.

Greelan commented 2 years ago

Is AMP writing the text to servertest.ini correctly? When I tested just now on a Linux install it seemed to do so OK.

In that case the issue will be with PZ itself, not AMP, in terms of how it displays the characters.

mockdot commented 2 years ago

No, the issue is not due to PZ itself, it's by AMP, AMP is incorrectly adding the characters. I also discussed this at the official PZ support chat, if you add the character directly to the serverfile.ini it works fine.

Greelan commented 2 years ago

Maybe it is a Windows thing. As I said, seems to add them fine on Linux

Greelan commented 2 years ago

I just tried on a Windows 10 VM. Still writing to the file OK. Not saying you are not having an issue, but trying to narrow down the cause. It is possible that if your system language is not set to English, for example, that AMP does not play nice with it.

IceOfWraith commented 2 years ago

I'm curious if it's something to do with their language settings or something in the OS. I doubt you changed your whole OS to Spanish so maybe that's a difference. Unless you did. In which case... Muy bien!

Greelan commented 2 years ago

No I didn't change the system language, that's why I suggested it as a possible cause. There have been other issues with AMP playing nice with other system languages (like Korean), so quite possibly also the issue here.

The OP could try using Unicode characters for the Spanish characters as a way of getting around the issue (not a solution, but at least a workaround).

mockdot commented 2 years ago

I use everything in english, it's definitely not my system language. I'll test unicode. Try adding the text shown above in the server description of project zomboid and start the server so you see the motd

Greelan commented 2 years ago

Looks OK?

Screen Shot 2022-06-04 at 3 50 59 pm
mockdot commented 2 years ago

Whoops, it's not server description, it's welcome message, sorry.

¡Bienvenido a Gamers.cr Project Zomboid, modo Vanilla!<LINE><LINE>Para interactuar con el panel de chat: presiona Tab, T, o Enter.<LINE><LINE>Usando tab cambiarás el tipo de chat en el que podrás hablar.<LINE><LINE>Chat global: /all<LINE>Chats locales: /say,/yell<LINE>Chats especiales: /whisper, /safehouse, /faction.<LINE><LINE>Presiona la flecha arriba para ver tu historial de mensajes. Presiona el ícono de rosca para personalizar tu chat.<LINE><LINE>¡Que sobrevivas mucho!

image

image

Broken servertest.ini:

image

Greelan commented 2 years ago

Still OK for me (the below is on Linux). Weird.

Screen Shot 2022-06-05 at 6 38 44 am
mockdot commented 2 years ago

Hmm, yeah the issue is still present on Windows. Not sure why you find it weird, I'm posting a report from the environment Windows. Additionally there isn't anything extra being done here, simply adding text to the welcome message.

Greelan commented 2 years ago

@IceOfWraith is testing it on his Windows installation. I nuked my PZ instance on my Windows VM

IceOfWraith commented 2 years ago

It shows up fine in the file for me... I'm on Windows 11 vs Server 2022 though. That could be the factor, but not sure. I'm using Firefox to enter it.

Greelan commented 2 years ago

At least we are narrowing down the issue. Maybe something to do with how locales are set up by default on Windows Server - perhaps it is missing some packages that come by default on Desktop versions

mockdot commented 2 years ago

Definitely strange then, if you see the server description adding Ú also breaks it:

image

mockdot commented 2 years ago

video showing the install of an instance from 0: https://www.youtube.com/watch?v=-vfdOKg08ag

IceOfWraith commented 2 years ago

Can you try something? No idea if this will have any impact... Go into File Manager under ADS, find the instance, open configmanifest.json and under the Welcome Message section change the input type to Textarea: "InputType":"Textarea",

IceOfWraith commented 2 years ago

And put your description back in AMP after that.

mockdot commented 2 years ago

Like we did with V Rising! Unfortunately that does't work in this case. It just prints the first line and the characters such as ¡ print the random characters.

Screen Shot 2022-06-09 at 19 43 45

IceOfWraith commented 2 years ago

Dang. It was worth a shot! (Although I didn't expect it to work for this)

mockdot commented 2 years ago

I'm up for testing anything that might solve it 😁

IceOfWraith commented 2 years ago

Try entering it with Firefox. It could be the browser you're using.

mockdot commented 2 years ago

If you look at the audit logs, they look ok, I tried Safari and Edge. On Windows and on Mac. I'll try Firefox in a little bit.

image

IceOfWraith commented 2 years ago

Yeah, I don't suspect that will work then. I'll spin up a Windows Server 2022 VM and see what happens. It'll be tomorrow though.

mockdot commented 2 years ago

At this point I'm wondering if I should try on Windows Server 2019. I also tried installing spanish language pack just in case.

Greelan commented 2 years ago

What do GET-WinSystemLocale and Get-WinUserLanguageList show in PowerShell?

mockdot commented 2 years ago

PS C:\Users\AMP> GET-WinSystemLocale

LCID Name DisplayName


1033 en-US English (United States)

PS C:\Users\AMP> Get-WinUserLanguageList

LanguageTag : en-US Autonym : English (United States) EnglishName : English LocalizedName : English (United States) ScriptName : Latin InputMethodTips : {0409:00000409} Spellchecking : True Handwriting : False

LanguageTag : es-CR Autonym : Español (Costa Rica) EnglishName : Spanish LocalizedName : Spanish (Costa Rica) ScriptName : Latin InputMethodTips : {140A:0000080A} Spellchecking : True Handwriting : False

PS C:\Users\AMP>

mockdot commented 2 years ago

Here's a full video from scratch to issue: https://www.youtube.com/watch?v=-vfdOKg08ag

mockdot commented 2 years ago

Any assistance with this?

IceOfWraith commented 2 years ago

What happens if you disable the Español (Costa Rica) language and enter it?

https://pureinfotech.com/add-multiple-languages-windows-10/

mockdot commented 2 years ago

Nothing, I had it that way before, I just kept testing and added Spanish to see if it was missing something, same results unfortunately.

mockdot commented 2 years ago

So this is currently fixed by adding the following line to the java start parameters of the instance, as per Mike suggestion:

-Dfile.encoding=UTF-8