New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

os.getenv在环境变量中存在中文时获取到的值长度不对 #142

Closed
xigalto opened this Issue Sep 6, 2017 · 6 comments

Comments

Projects
None yet
2 participants
@xigalto
Contributor

xigalto commented Sep 6, 2017

如题,应该是内部字符串计算长度的时候的问题,英文的是对的

@waruqi

This comment has been minimized.

Show comment
Hide comment
@waruqi

waruqi Sep 6, 2017

Member

是windows还是其他系统下有问题? 如果是windows,确实有点问题,我已经修复,可以尝试重新从release上下载安装2.1.6版本试试

Member

waruqi commented Sep 6, 2017

是windows还是其他系统下有问题? 如果是windows,确实有点问题,我已经修复,可以尝试重新从release上下载安装2.1.6版本试试

@xigalto

This comment has been minimized.

Show comment
Hide comment
@xigalto

xigalto Sep 8, 2017

Contributor

win10系统,我用的就是最新的2.1.6的。那应该是还没修复好这个问题

Contributor

xigalto commented Sep 8, 2017

win10系统,我用的就是最新的2.1.6的。那应该是还没修复好这个问题

@waruqi

This comment has been minimized.

Show comment
Hide comment
@waruqi

waruqi Sep 8, 2017

Member

能否具体描述下是什么问题?环境变量值是多少,通过getenv获取到的内容,长度是多少?期望长度值等。。我好针对性测试下

Member

waruqi commented Sep 8, 2017

能否具体描述下是什么问题?环境变量值是多少,通过getenv获取到的内容,长度是多少?期望长度值等。。我好针对性测试下

@xigalto

This comment has been minimized.

Show comment
Hide comment
@xigalto

xigalto Sep 8, 2017

Contributor

key:IEO_SDK_PATH
value:E:\代码\self\LibHelper
得到的实际内容是 E:\代码\self\LibHelpe
少了后面两个字节,所以我怀疑是你用unicode的方式得到的长度来截取了字符串的值。

Contributor

xigalto commented Sep 8, 2017

key:IEO_SDK_PATH
value:E:\代码\self\LibHelper
得到的实际内容是 E:\代码\self\LibHelpe
少了后面两个字节,所以我怀疑是你用unicode的方式得到的长度来截取了字符串的值。

@waruqi

This comment has been minimized.

Show comment
Hide comment
@waruqi

waruqi Sep 8, 2017

Member

我这边在xp和win10上测试ok,你确定有更新最新的2.1.6版本? 在你提issues反馈问题后,我修复了此问题,并且重传了2.1.6的安装包,需要重新安装下的。。

C:> xmake l -c "print(os.getenv(\"IEO_SDK_PATH\"))"
E:\代码\self\LibHelper
Member

waruqi commented Sep 8, 2017

我这边在xp和win10上测试ok,你确定有更新最新的2.1.6版本? 在你提issues反馈问题后,我修复了此问题,并且重传了2.1.6的安装包,需要重新安装下的。。

C:> xmake l -c "print(os.getenv(\"IEO_SDK_PATH\"))"
E:\代码\self\LibHelper
@xigalto

This comment has been minimized.

Show comment
Hide comment
@xigalto

xigalto Sep 8, 2017

Contributor

刚下载了最新的果然好了,是我没更新到的原因:)

Contributor

xigalto commented Sep 8, 2017

刚下载了最新的果然好了,是我没更新到的原因:)

@xigalto xigalto closed this Sep 8, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment