So i have my Unreal Project setup with perforce. And everything is setup correctly. But now someone creates a new Project Input settings and as we are german, maybe just for testing purposes, someone decided to use Umlauts, ö, ä ü.
After submitting the new DefaultInput.ini to perforce server, the whole file gets messed up. Looks like chinese characters etc. (displayed with Notepad++). And if someone then syncs the new inputs via Perforce, all the controls are of course gone.
Interestingly, just submitting a file with ö, ä , ü etc. and synching the file via perforce does not mess the file up.
My conclusion
Not sure if this is the correct conclusion to draw from this, but It seems that UE changes the Encoding or adds some stuff to the Input.ini file(leading characters or something maybe?) that afterwards gets the perforce server to mess the file up.
The Question
How can I prevent this. What is Epic using on their Perforce Server P4Charset? Do i have to enable the Unicode-Mode for our perforce server? Or is this a bug in the engine? Does the engine convert the file into another encoding when adding Umlaute?
Thank you very much in Advance
p.s.
*This is not related to a specific engine version or 4.12. This is happening in a lot of engine versions, at least since 4.9 i think, but reproducible with 4.12, 4.13 etc. *
From what I’m seeing when looking up Umlaute in relation to Perforce, it seems that having Unicode enabled is suggested by Perforce customer service. Have you tried enabling this to see if it’ll fix the issue? I believe it’s on the perforce side but we’ll have to test this to see where the issue is happening.
Well, For me it’s just suspiscious that ordinary text files created by hand do not have any problems with perforce and can be shared without a problem. To be honest, I am just a bit scared if the switch on the server will mess all text files up. XD
Also, what are you running at epic? In general, this is also a point that should maybe be pointed out in the documentation in “Perforce Setup” after we narrow it down a bit.
Anyway, steps to reproduce:
Create unreal project, have it under perforce source control and add an input mapping that maps on ö for example.
Submit the DefaultInput.ini
get the latest revision on a second PC of that project and you should see the text file all messed up.
All under the premise that your server is also not unicode-enabled. And if it is, maybe you cannot reproduce it, which would then be the solution. But then as I said, why can I create text files with Umlauts and sync those files via perforce without a problem and nothing messed up.
also concering the perforce threads you are mentioning, all I can find is stuff with Umlauts in the filename, not the file itself (and yes this is quite bad…and we are of course avoiding those…). Can you point out the threads you are referencing?
Ah, the ones I was looking at were also talking about filenames. Our server is not unicode enabled but I did just find something that may workaround this. I was unable to set an input to “ö” as that isn’t an option for me, but I did create an input called “ö”. After doing this, I added DefaultInput.ini to the perforce server (it isn’t automatically added when adding a project, or at least wasn’t in my case) and noticed that it added it as a binary filetype instead of a text filetype. After having another member sync to it, it came through fine. Once I changed it to text however, it came through as gibberish. Can you try using Binary as the filetype instead? It seems that Perforce will pick up on this automatically if the file is added while containing umlauts.
please check this link. This is the official documentation. We also added the Config folder as proposed to the perforce stream. Also we created the TypeMap as it says. And as you can see, ini-Files should be text files, so you can diff/merge them etc. Thus, using binary does not make sense and it would also mean that I would have to change the typemap and changing ALL .ini files from text to binary file types. Would be possible but is a bit ugly.
Also please keep in mind that we now found out what the cause is and avoid Umlauts now, but this does not help other users. Also see below for why I am still thinking this is also a problem from the engine.
Additionally, as I said, just creating an empty text file with Umlauts works so from my point of view, the Engine is chainging something to the encoding part when adding Umlauts to the Input.ini. So PLEASE test this cast. Just create an empty text file (.ini) and add Umlauts (or lorem ipsum lorem etc). and add those to perforce. The file should not be messed up in any way. Thus, leading to my conclusion that the engine is changing encoding parameters when a user adds Umlauts to the Input Mapping etc.
At least you were able to reproduce the error and that the files get messed up using Umlauts as Input Action Mappings.
Also I do not understand why you can’t set an Input Ö as you mentioned, cant you add the german keyboard to windows?
Anyway, thanks for confirming that your server isn’t in Unicode-Mode. Then we at least have the same basis. If you do have a test server (because I guess you have more than 1) which is uncode-enabled, could you try the tests on this server instead? Unfortunately I cant really imagine what happens when changing the servers whole encoding to Unicode. Also because there are other non Unreal-related projects on it.
I understand that the documentation does mention making all .ini’s into text types, but this is assuming that you’re not using any special characters. As for seeing this issue with a normal text file, I can confirm that I can’t get it to reproduce with that. When it comes to setting an input to ö, it’s not that I can’t type it in, it’s just that UE4 doesn’t list it as a valid input for me, could be due to having an English version of Windows.
That aside, this is obviously an encoding issue and since it does seem UE4 related I’ve placed a bug in for it. You can find the report under the number UE-34454.
In the meantime, I would suggest setting these file types to Binary, or you also have the option of using utf16, as that should support these characters.
Just had this happen to me. Sorry to necro. 30+ Perforce Projects, never had this happen until now… super annoying. Always followed the typemap…nothing changed with my workflow… this is in 4.15.3 though.
“fixed” it, (had a copy of a good one that wasn’t garbled yet), deleted from repo the ■■■■ one. Created a NEW defaultinput.ini by going into editor and adding a “test” input action. Submitted that to repo. Made sure it was good. It was.
Then, copy pasted ONLY the actual inputaction/axis mappings in between all the other ■■■■ (so just under my test input action mapping)
sent it up to repo, looks good for all clients now.
All I know, everytime I tried to just submit the copy (which was obviously an issue, somehow corrupted probably awhile ago) I would end up with that garbled mess.