Skip to main content
9 events
when toggle format what by license comment
Nov 15, 2023 at 3:04 comment added dave_thompson_085 I think you have this backward. On my 8.1 (I don't have 7) type of UTF16LE with BOM converts to ASCII, but UTF16LE without BOM (which OP has) keeps the null byte after each character which on console displays as a space, and blanks out the first real character; if >file it is still UTF16LE not ASCII.
Jun 2, 2023 at 14:02 comment added harrymc You wish to modify my answer or your post ? Go ahead, no problem.
Jun 2, 2023 at 13:01 comment added bfh47 Hi, thanks for the reply - to be fair, the original thread I found was not easy to find, and 100% evaded search results (I went through ALL threads under the [utf16le] tag on SO manually). In that case, would it be OK if I also re-wrote the main post to be more concise and to the point? Given how much of your own time you volunteered to helping on this thread, I think it's fair to ask you first. Thanks
Jun 2, 2023 at 12:29 comment added harrymc I won't be offended, but a thread on stackoverflow doesn't mean that your post is redundant. You should rather post here your own answer and mark it as accepted.
Jun 2, 2023 at 12:18 comment added bfh47 Hey again - I found a solution: someone on stackoverflow had the exact same query many years ago, and they were recommended to use gnuwin32 ("iconv") program. I was able to successfully use this program via CMD to get the correct conversion. Would you be offended if I were to delete my thread, as I see it as absolutely redundant now...
May 30, 2023 at 9:40 comment added bfh47 It's fair enough, no problem, I am just looking at this and it looks like something I've tried already, that's all. I am not at home currently so will only be able to try this later today. Just to clarify, you suggest running "powershell -command "command in quotes"" from cmd/batch - right? On an unrelated note - do you think it's worth me tidying up the question, and maybe opening it in stackoverflow? Is this "superuser" material or more advanced?
May 30, 2023 at 9:29 comment added harrymc I'm only making suggestions, the decision is yours what to do.
May 30, 2023 at 9:21 comment added bfh47 Hello! Do you happen to know if this solution differs from the powershell method I mentioned in my original post? It's just, on the surface it looks very similar. Just to be clear (I tried to make sure my post was detailed, but I considered less the prospect of making that information easily understandable.. so I apologise), the file created by piping recycle.exe output to a txt file, is UTF-16 LE, without BOM. That is the format I need to convert from. When I ran powershell's get-content out-file, it was in a seperate PS1 file, your suggestion is to do it within batch without a "middle-file"?
May 30, 2023 at 7:59 history answered harrymc CC BY-SA 4.0