档案中的耳朵编码 [英] Ear encoding inside the archive

查看:61
本文介绍了档案中的耳朵编码的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这些天来,我疯狂地使用Weblogic在Unix环境上进行部署.
最后,我通过使用(cat -v file.properties)意识到该文件在行尾充满了^ M.
发生这种情况是因为我在Windows上编辑了属性文件,然后又由FileZilla转移到了生产环境中.
通过使用dos2unix命令,我解决了这个问题,并且文件的编码现在是正确的.
由于属性文件不是我编辑的唯一文件,因此我打开了ear存档并自定义了config.xml也是如此,然后再次闭合耳朵并将其传输到linux,您是否认为即使将XML嵌入到耳朵中,该xml的编码也可能会成为问题?

谢谢

These days, I drove crazy to deploy an ear on unix enviroment using Weblogic.
At the end I realized by using (cat -v file.properties) that such file was full of ^M at the end of the line.
This happened because I edited the properties file on Windows and I transfered to the production eviromnment by FileZilla.
By the usage of dos2unix command, I addressed the problem and the encoding of the file right now is correct.
Because the properties file it's not the only one I edit, but I open the ear archive and customize the config.xml too, and then close the ear again and transfer it to linux, do you think that the encoding of that xml can be a problem even if it's embedded inside the ear ?

Thanks

推荐答案

您可以使用蚂蚁 fixcrlf .

如果使用maven,还可以运行ant任务来准备文件.

If you use maven you could also run an ant task to prepare the files.

这篇关于档案中的耳朵编码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆