Perforce encoding issue

Hi,
After syncing my source onto another computer using perforce, I noticed the file was filled with Chinese (and other) characters. It turns out the .cpp and .h files created by UE4 (using “new c++ class” in the editor) are encoded in utf-16, however, my typemap sets .cpp and .h files as ‘Text’ (as seen in the documentation). This causes the line-endings to get messed up by perforce.

It seems strange that the documentation would so contradict the files created by UE4, so I wonder if I’m doing something wrong and how to best fix this issue. I could just remove cpp and h files from the typemap, but I fear this could cause issues later on.

I’m having this issue too. On 4.10.

Hello Neopica.kd and spiez,

When you say that the file is filled with “Chinese” do you mean literal Chinese or just foreign symbols? Also, how are you opening these .cpp and .h files to see this result? When you’re syncing to Perforce, are you using the engine plugin for this or are you syncing through Perforce itself?

We haven’t heard from you in a while, Neopica.kd and spiez. Are the two of you still experiencing these issues? If so, it would be helpful if you could provide the information requested in my previous comment. In the meantime, I’ll be marking this issue as resolved for tracking purposes.