O$ 10.0 Export to file on windows is unicode

Gordon Wilson g_r_wilson at yahoo.com
Thu May 27 02:52:12 UTC 2021


 Hi Paul

That one bit me in the BOM too. Love to know the solution when you find one. I was using Omnis 3 to import from a csv file exported from third party software. This doesn't solve your problem but I solved it simply by stripping all characters until the first keyboard safe character appeared.

Good luck. ; )


Gordon.

    On Thursday, 27 May 2021, 1:32:20 pm NZST, Paul Mulroney <pmulroney at logicaldevelopments.com.au> wrote:  
 
 Hi $all,

I've got a weird one.  I'm exporting a file to disk, and then later it's being downloaded in the jsClient.  When I'm testing on my mac, it downloads the tab-delimited file as ASCII UTF-8, no problems. Run the same in production on windows server, and it's downloaded as UTF-8 with BOM.  This causes problems when I try to open the file in Excel.  The file also has CR/LF when exporting from a windows platform, and only a CR when exporting from the Mac. 

Can I make it so that it always exports with CR/LF, regardless of platform?

It's running a multi-threaded server, I'm wondering if that's causing a problem with the unicode export?

Here's the code in the startup task:

> Do $root.$prefs.$exportencoding.$assign(kUniTypeUTF8)                          ## Export as UTF-8 (ie ASCII)
> Do $root.$prefs.$exportbom.$assign(kFalse)                                      ## Turn off export Byte Order Marker in the export file.

Here's the basic code that generates the export file.

> Set print or export file name [vsPathName]
> Prepare for export to file Delimited (tabs)
> Export data vlExport
> End export
> Close print or export file

What am I missing?

Regards,
Paul.




An invisible man married an invisible woman.  The kids were nothing to look at either.
-- 
Paul W. Mulroney                                            We Don't Do Simple Pty Ltd 
pmulroney at logicaldevelopments.com.au      Trading as Logical Developments
www.logicaldevelopments.com.au                  ACN 161 009 374 
Ph: +61 8 9458 3889                                      86 Coolgardie Street
                                                                        BENTLEY  WA  6102



_____________________________________________________________
Manage your list subscriptions at http://lists.omnis-dev.com
Start a new message -> mailto:omnisdev-en at lists.omnis-dev.com 
  


More information about the omnisdev-en mailing list