perforce 设置unicode模式

本文介绍了解决Perforce在跨平台使用时中文乱码的问题。通过将服务端与客户端设置为Unicode模式,确保了Windows服务端与MacOS客户端间中文字符的正确传输。服务端需在安装目录下运行特定命令进行配置,而客户端则需在启动时选择UTF-8编码。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

  如果perforce服务端和客户端部署在不同的操作系统下时,例如服务端部署在windows系统下,客户端为Mac OS系统,则上传的代码中的中文会变成乱码,

此时需要在服务端与客户端均设置成 unicode(UTF-8)模式。

perforce服务端安装完成后

运行 CMD, 输入以下命令:

====================================

/*进入perforce安装目录*/

cd C:\Program Files\Perforce\Server

 p4d -xi

=====================================

成功后会看到

“server switched to unicode mode.”

此时perforce已成功切换至 unicode 模式。

随后运行 p4v 等客户端时。会有选择编码的选项, 选择"utf-8"即可

转载于:https://www.cnblogs.com/marrco2005/archive/2013/03/07/2947944.html

#------------------------------------------------------------------------------- # Sample /etc/perforce/p4dctl.conf file for p4dctl # # See 'man 5 p4dctl.conf' for more information #------------------------------------------------------------------------------- #------------------------------------------------------------------------------- # Environment variables common to all servers #------------------------------------------------------------------------------- Environment { P4DEBUG = "server=3" # Embedded = requires quotes P4LOG = log P4CONFIG = .p4config } #------------------------------------------------------------------------------- # Sample server specifications #------------------------------------------------------------------------------- #p4d main #{ # Owner = perforce # Execute = /opt/perforce/sbin/p4d # Prefix = /var/lib/perforce/p4-main/main # Environment # { # P4ROOT = /home/perforce/p4-main # P4JOURNAL = journal # P4PORT = ssl:1666 # P4SSLDIR = ssl # PATH = /bin:/usr/bin:/usr/local/bin:/opt/perforce/sbin # } #} #p4d test #{ # Owner = tony # Execute = /opt/perforce/sbin/p4d # Enabled = false # Environment # { # P4ROOT = /home/tony/p4tmp # P4JOURNAL = journal # P4PORT = 1667 # PATH = /bin:/usr/bin:/usr/local/bin:/opt/perforce/sbin # } #} #p4p india #{ # Owner = perforce # Execute = /opt/perforce/sbin/p4p # Environment # { # P4PCACHE = /home/perforce/p4p-india # P4TARGET = india.mycorp.com # P4PORT = 1777 # PATH = /bin:/usr/bin:/usr/local/bin:/opt/perforce/sbin # } #} #------------------------------------------------------------------------------- # Or you can include from external files and directories # # For example: # # include /etc/perforce/p4d-main.conf (includes a specified file) # include /etc/perforce/p4dctl.d (includes *.conf files from the directory) #------------------------------------------------------------------------------- # By default, include all *.conf files in /etc/perforce/p4dctl.conf.d include /etc/perforce/p4dctl.conf.d
最新发布
06-22
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值