找回密码
 注册成为天翎用户
查看: 904|回复: 2

[已解决] 1.6升级4.4 视图字段ID重复问题

[复制链接]
xmuboso1 发表于 2021-1-7 13:51:20 | 显示全部楼层 |阅读模式
【myApps/OBPM版本号】:4.1升级4.4
【浏览器类型】:Chrome
【联系方式-QQ】:877121257
【问题描述】
1.6升级4.4 视图字段ID重复问题
自己写脚本在原来ID里插入内容后,启动系统后所有视图字段出现中文乱码,部分脚本也有乱码。

脚本
  1. import os
  2. i = 1
  3. path = "C:/Users/igoodot/Desktop/HCRM.application"
  4. for root, dirs, files in os.walk(path):
  5.     for name in files:
  6.         i = i + 1
  7.         ss = str(i) + "cp-"  # 插入内容
  8.         if os.path.splitext(name)[1] == '.column':
  9.             file_dir = os.path.join(root, name)
  10.             print(file_dir)
  11.             file = open(file_dir, 'r', encoding='utf-8')
  12.             # file = open(file_dir, 'r')
  13.             content = file.read()
  14.             post = content.find('<column id="')
  15.             print(post)
  16.             if post != -1:
  17.                 content = content[:post+len('<column id="')]+ss+content[post+len('<column id="'):]
  18.                 file = open(file_dir, 'w')
  19.                 file.write(content)
  20.             file.close()
复制代码


本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有账号?注册成为天翎用户

×
smart 发表于 2021-1-12 14:40:09 | 显示全部楼层
你检查一下你的系统字符串编码 和你升级后的编码 你这个应该是编码不一致导致乱码的 你这边还有问题的话 你可以私聊我哟
回复

使用道具 举报

 楼主| xmuboso1 发表于 2021-1-12 14:53:43 | 显示全部楼层
结贴,已解决
回复

使用道具 举报

本版积分规则

手机版|天翎MyApps技术社区 ( 粤ICP备11093750号 )

GMT+8, 2026-8-14 22:56

Powered by Discuz! X5.0

© 2001-2026 Discuz! Team.

快速回复 返回顶部 返回列表