DefaultInput.ini becomes a garbled mess, encoding issue?

For a while now, strange things have happened to our local DefaultInput.ini file. It looks normal in Perforce and then locally it’s full of this when doing a diff:

55053-defaultinputsalad.gif

Turns out when I open the file in Notepad++ the encoding is set to UCS-2 and I can fix it by setting it to UTF-8 without BOM. We never manually edit this file ever, we only use project settings in the editor to manage our inputs so i can only assume it’s the editor that messes it up?

Also if the file is checked in like that it doesn’t run properly in UE4 at all. At that point no inputs work anymore and we have to revert to an earlier version, losing whatever additional inputs we had defined since last check in.

Any infos on this strange behavior?

Hello Gigantoad,

I have a few questions for you about this issue

  1. What OS are you using?
  2. You mention that you reverted to an earlier version, do you mean an earlier version of your project or of the engine?
  3. If it is engine version related, do you know what version it began with?
  4. Does this happen even with a fresh project?

Hi , I’m using Windows 10 but it also happened back on windows 8.1, also happened to other team members and I’m not entirely sure what OS they are on. Reverted to earlier version I meant DefaultInput.ini only, just the file. Not sure about when it started, probably like 4.7.

Did some testing on a fresh blank project and found out it happens for example when I use ä (umlaut) in a binding name, then the encoding switches to ECS-2 for no obvious reason. So I went through the bindings in our game and the only candidate is one called “Equip/Stow”. Might the slash be causing this maybe?

That seems like a possibility, the special characters issue I mean. I’ll look into possible causes and get back to you as soon as possible.

Hello Gigantoad,

A bug report has been entered for this issue to look into the problem. The code itself for the encoding is pretty old and hasn’t been touched in a long time so it’s likely that it’s the problem. Please look forward to a fix in a future release. Unfortunately, I can’t think of any workarounds past not using special characters.

Have a nice day,

I also had this issue just now on 4.11.2, encoding comes in as UCS-2, file is garbled. Unfortunately this was the first check-in to perforce.

I think I found the issue after it just happening again. Our DefaultInput.ini was set to UTF16 in perforce. I changed the filetype back to Text and things are working ok now.