|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2019-08-26 02:25 UTC] baoguoxiao0538 at hotmail dot com
Description:
------------
The PHP execution code in the Linux environment is normal, but the execution result in Windows is wrong
Test script:
---------------
var_export(str_getcsv('应收账款上账日期,客户名称,凭证号,摘 要,借方本币,贷方本币,账龄区间,出库日期,回款上账日期,回款天数'));
Expected result:
----------------
array (
0 => '应收账款上账日期',
1 => '客户名称',
2 => '凭证号',
3 => '摘 要',
4 => '借方本币',
5 => '贷方本币',
6 => '账龄区间',
7 => '出库日期',
8 => '回款上账日期',
9 => '回款天数',
)
Actual result:
--------------
array (
0 => '应收账款上账日期',
1 => '客户名称',
2 => '凭证号,摘 要,借方本币',
3 => '贷方本币',
4 => '账龄区间',
5 => '出库日期',
6 => '回款上账日期',
7 => '回款天数',
)
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Mon Oct 27 21:00:02 2025 UTC |
I can confirm this erroneous behavior for the zh-cn locale; it works as expected for the en-us locale, though. So as a work-around for now, you may consider: var_dump(setlocale(LC_ALL, 'en-us')); var_export(str_getcsv('应收账款上账日期,客户名称,凭证号,摘 要,借方本币,贷方本币,账龄区间,出库日期,回款上账日期,回款天数'));