[ 
https://issues.apache.org/jira/browse/CSV-219?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16285876#comment-16285876
 ] 

Zhang Hongda edited comment on CSV-219 at 12/11/17 1:34 PM:
------------------------------------------------------------

Thanks Gary. By the way, I even deleted the "if (c <= COMMENT) {" branch to 
meet what the Microsoft Excel does in my job. But when I have read the comment 
under it, I am not sure if it is a bug or a feature. I think this sourcecode is 
only affect to the printing of a CSV file, but has no no effect on the parser. 
When I tried to parse a CSV file with a char which ASCII code less than '#' but 
more or equal than 0x20 without quoting it, I didn't find any problem which the 
comment says. I still wondered in which case the parser will fail in common 
cases. So for the time being, I am not reporting that as a bug.


was (Author: hongda):
Thanks Gary. By the way, I even deleted the "if (c <= COMMENT) {" branch to 
meet what the Microsoft Excel does in my job. But when I have read the comment 
under it, I am not sure if it is a bug or a feature. I think this sourcecode is 
only affect to the printing of a CSV file, but has no no effect on the parser. 
When I tried to parse a CSV file with a char which ASCII code less than '#' but 
more or equal than 0x20, I didn't find any problem which the comment says. I 
still wondered in which case the parser will fail in common cases. So for the 
time being, I am not reporting that as a bug.

> The behavior of quote char using is not similar as Excel does when the first 
> string contains CJK char(s)
> --------------------------------------------------------------------------------------------------------
>
>                 Key: CSV-219
>                 URL: https://issues.apache.org/jira/browse/CSV-219
>             Project: Commons CSV
>          Issue Type: Bug
>          Components: Printer
>    Affects Versions: 1.5
>            Reporter: Zhang Hongda
>         Attachments: diff.patch
>
>
> When using CSVFormat.EXCEL to print a CSV file, the behavior of quote char 
> using is not similar as Microsoft Excel does when the first string contains 
> Chinese, Japanese or Korean (CJK) char(s).
> e.g.
> There are 3 data members in a record, with Japanese chars: "あ", "い", "う":
>   Microsoft Excel outputs:
>   あ,い,う
>   Apache Common CSV outputs:
>   "あ",い,う



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to