Search code examples
textencodingucs2source-engine

How can i Convert a text file to UCS-2 LE, from whatever the default is?


I am looking for a way to convert or save a text file in the UCS-2 LE format; specifically without BOM...i guess.

I have zero knowledge what any of that means actually; but i know i need that because of this wiki page on what i am trying to accomplish: https://developer.valvesoftware.com/wiki/Closed_Captions

in other words: this is for a specific game engine, "Source Engine," which requires the format in order to compile in-game closed captions for sounds.

I have tried saving the file in Notepad++ using the "UCS-2 LE BOM" option under the encoding menu...there is no option for just "UCS-2 LE" however, and because of this, the captions cannot be compiled for the game engine. I need to save without BOM, "I guess" (because again I don't know what I'm talking about and I assume based on logical conclusions, that I need to not have BOM, whatever that actually means.)

I would like to know about a way to either save a txt file in that encoding format; or a way to convert one.


Solution

  • In my specific case; it appears that my problem boils down to "the program is weird."

    what I mean by this is, notepad++ actually does save in the correct format; but I failed to realize that because of a quirk in the caption compiler where it only works if you drag the file onto it; not via command line as previously thought.

    I will accept this as the answer when i am allowed to in 2 days.