read output of txt file has white spaces

后端 未结 3 1210
囚心锁ツ
囚心锁ツ 2021-01-21 11:40

i got the list of applications from cmd command using /output:D:\\list.txt product get name,version. However when i try to retrieve the list using java the output has white spac

3条回答
  •  暗喜
    暗喜 (楼主)
    2021-01-21 12:16

    Looks like you read a UTF-16 encoded file.

    Give a hint to your Reader - pass "UTF-16", instead of "ISO-8859-1".

提交回复
热议问题