[Text Editor] 用深度的文本编辑器编辑txt文件,在Windows打开格式混乱
Tofloor
poster avatar
yty
deepin
2021-02-05 20:07
Author

如图,我就是用深度的这款文本编辑器创建和修改txt文件,然而这些文件在Windows系统中打开,发现回车换号全部失效了,所有文字密密麻麻挤成一团

Reply Favorite View the author
All Replies
安洛
deepin
2021-02-05 20:12
#1

linux回车符和windows回车符不一样(\r和\n,oier应该很了解)。

这个可以用命令来转换。我没有这个需求就不测试了,网上资料很多。

Reply View the author
蔡EEPIN
deepin
2021-02-05 20:14
#2

sudo apt install dos2unix

unix2dos 你的txt文件路径

Reply View the author
Ziggy
deepin
2021-02-05 20:15
#3

编码格式不一样,换UTF-8(Windows)

Reply View the author
lcw0268
deepin
2021-02-05 20:16
#4

debian的txt文本在windows下都这样,windows的文本在debian显示正常,楼主说,这锅该谁背?

Reply View the author
mdd3135
deepin
2021-02-05 20:56
#5

windows和linux的默认编码方式不同,linux默认是UTF-8,windows记事本打开那个文件后另存为,选择编码为UTF-8就好了

Reply View the author
code nxj
deepin
2021-02-05 23:35
#6

换行符不一样啊,使用支持\n换行符的编辑器即可~

Reply View the author
shy
deepin
2021-02-05 23:40
#7
lcw0268

debian的txt文本在windows下都这样,windows的文本在debian显示正常,楼主说,这锅该谁背?

编码方式来背

俩系统编码方式不同

windows那边改一下编码方式也可以正常显示

Reply View the author
duanyao
deepin
2021-02-06 07:35
#8
lcw0268

debian的txt文本在windows下都这样,windows的文本在debian显示正常,楼主说,这锅该谁背?

notepad 背。其它文本编辑器几乎都是兼容3种换行模式的,windows上装个notepad++ 、ultraedit 什么的都可以。

Reply View the author
灵兮之
deepin
2021-07-21 05:55
#9
duanyao

notepad 背。其它文本编辑器几乎都是兼容3种换行模式的,windows上装个notepad++ 、ultraedit 什么的都可以。

为啥deepin-editor没有设置换行符为win或者unix的选项?

Reply View the author