CSV Import UTF8 issue

Started by tf67, January 13, 2015, 11:02:50 AM

Previous topic - Next topic

tf67

Hi All,
I had some trouble to use the csv import functionality receiving an error message saying 'Type shoulde be of ArchiMate element type'. I traced back the problem to the file encoding being UTF8, converting it into ANSI resolved the issue.

I think it would be helpful to include a note to the user guide that the file must be in ANSI format
and I would appreciate to see csv UTF8 support in the next release.

Thanks,
Tom

Phil Beauvoir

Hi,

that doesn't sound right. "Type should be of ArchiMate element type'" is an error that occurs if a referenced element is not an ArchiMate concept. ANSI/UTF-8 should not affect it. Unless something gets mangled. Do you have a simple example to reproduce the error?

Phil
If you value and use Archi, please consider making a donation!
Ask your ArchiMate related questions to the ArchiMate Community's Discussion Board.

tf67

Hi Phil,

thanks for looking into this. Please see attached a sample file.

Phil Beauvoir

Thanks for the attached file. I get the same error. But the error message is not the real issue.

Your file is UTF-8, but it is UTF-8 with BOM type. The CSV parser library that Archi uses (http://commons.apache.org/proper/commons-csv/) reads in the first line but for some reason does not remove quote marks from the first field:

"ID",TYPE,NAME,DOCUMENTATION

And so parsing fails.

I'm not sure if I can work around this. In the mean time, save CSV files as UTF-8, but not UTF-8 with BOM.

Phil
If you value and use Archi, please consider making a donation!
Ask your ArchiMate related questions to the ArchiMate Community's Discussion Board.

tf67

Thanks Phil for the quick reply.

In the meantime I tested UTF-16 (UCS-2) Little Endian & UTF-16 (UCS-2) Big Endian which are also causing errors although different.

All in all, I think it is not a big issue and I agree in must cases ANSI is absolutely fine.