When read from file, they turn out OK, but not from command

jpg upload
I'm currently using this file workaround; saving the caption to a file with file put contents & read from file. But ideally, i'd like to use the cmd like i regularly would.
I've tried setting -encoding Unicode and everything else that's mentioned but just couldnt get it to work, do you think it's possible ?