Link Search Menu Expand Document

CSVDocument Constructor

Explanation Initialize CSVDocument.

Added since Ver.4.2.0 from here-->
If specified enc in CSVDocument, the internal character code will be in Unicode. If ommitted, the multi-byte character code (Shift-JIS if in Japanese environment) depends on the platform language.
<--till here

Added since Ver.5.3.0 from here-->
When specifying CSVDocument:UString and the data-type is specified as UString, it is the same as specifying Constructor in CSVDocument.Unicode.
<--till here

Since AI Ver.1.0.1 the internal character code will always be in UTF-8.
Call format var csvdoc = new CSVDocument( [ enc ] )
Return value CSVDocument object
Arguments integer enc Specify internal character code.
Currently, character code that can be specified is only CSVDocument.Unicode.
If omitted it will be in multi-byte code(Shift-JIS in case of Japanese environment).

Added since Ver.4.2.0
Not supported in Mobile
More obsolute than AI Ver.1.0.1. Internal character code will always be UTF-8.
Exception None
Example of use
    var csvdoc = new CSVDocument(CSVDocument.Unicode);
    var res = session.Get("/test/sample.csv");
    csvdoc.Load(res);
    
Related item

About CSVDocument which internal character code is Unicode(PC ver, Mobile ver)

If CSVDocument.Unicode is specified as an argument, the internal character code is treated as Unicode.
If want to use Unicode-specific characters or characters that are not in the platform character code (Shift-JIS in Japanese) for the data to be handled, set the internal character code to Unicode.

If the internal character code is set as Unicode, you need to save CSV file in Unicode (UTF-16) format using Get method, Load method. If file is saved in Multi-byte code(Shift-JIS or UTF-8 etc.), the CSV file cannot be read. If Save method is used, the format will be in Unicode (UTF-16).


About CSVDocument character code in Biz/Browser AI (Android ver)


From Biz / Browser AI 1.0.1, the internal character code of CSV Document is always UTF-8. Therefore, the CSV file loaded by the Get method and Load method must be saved in UTF-8 format. CSV files saved with other character codes (Shift-JIS, Unicode (UTF-16), etc.) cannot be read. Saving by the Save method is also in UTF-8 format.