I want use different separator while compressing flex monster data using flex monster compressor.By default its taking comma (,) as default separator .Due to comma separator i am getting some wrong data while using number format in my project . Suppose if have any number data which contains comma then flex monster treating it as new column.
Can you please tell is fieldSeparator option is there for “ocsv” datatype ?Because in my project if it is a csv datatype if it contains ‘~’ as a separator , if i am configuring fieldSeparator as ‘~’ then its working but for ocsv type this option is not working.
Please find the attached screen shot.
Thank you for writing to us.
If you are compressing the data from the database, Flexmonster Compressor does not need any
fieldSeparators specified. In case you want to compress CSV file that contains ‘~’ as a separator, it can be specified as a second argument:
InputStream compressFile(String fileName, char delimiter)
Alternatively, for strings in CSV format and streams:
InputStream compressString(String string, char delimiter)
InputStream compressStream(InputStream inputStream, char delimiter)
Please let us know if it helps.
Thank you for the response.
The above solution is not working for “ocsv” dataSourceType .
Please find the attached project in zip format
Could you please respond on this ASAP ?
Thank you for your reply and for sharing a code sample.
It helped us a lot to understand the problem with preformatted numbers better and reproduce it on our side.
As a result, we noticed that the issue occurs when the decimal separator is “,”.
Our team is currently working on a solution to this issue and the fix will be available in the minor release with the ETA May 6th.
We kindly advise passing raw (not preformatted) data to Flexmonster Compressor.
Please note that raw number data can be formatted on the client side in Flexmonster via the thousandsSeparator and decimalSeparator option in the formats parameter.
This can be achieved the following way:
/* SET DESIRED SEPARATOR FOR THOUSANDS */
/* SET DESIRED SEPARATOR FOR DECIMALS */
We have prepared a few JSFiddle examples for illustration:
1) In this JSFiddle example, it is shown how the number format can be predefined in Flexmonster via the formats parameter.
2) In this JSFiddle example, you can see how the number format can be changed during runtime.
Could you please provide more information on how and where you get your data? It would greatly help us.
Please let us know if passing raw data would work for you.
We are looking forward to hearing from you.
Thank you for quick response.
We are getting data from service call only and in our case we are using compress data only i.e ocsv type . We can not use raw data.
We will wait for the fix in the minor release.