<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic That's encouraging, if there in Intel® Fortran Compiler</title>
    <link>https://community.intel.com/t5/Intel-Fortran-Compiler/CSV-delimiter-detection/m-p/956164#M93424</link>
    <description>&lt;P&gt;That's encouraging, if there is a way to retrieve the regional default list setting.&amp;nbsp; Other suggestions don't help because of the application I need:&lt;/P&gt;

&lt;P&gt;I let users click on a button for data entry with Excel, which opens a template with instruction for entering data field s characteristics and rows of records of data values. After Excel is closed with the file saved in CSV format, I open it and process the file. Thus there is no way to a priori &amp;nbsp;know what the separator is. What I need is a way to retrieve the regional list separator&amp;nbsp;setting.&amp;nbsp;&lt;/P&gt;

&lt;P&gt;Does anyone know how to retrieve this, or temporarily set it?&amp;nbsp; I'm searching on the internet, but nothing found so far outside of Excel, Java and VBA.&lt;/P&gt;

&lt;P&gt;Thanks&lt;/P&gt;</description>
    <pubDate>Sat, 11 Jan 2014 22:08:36 GMT</pubDate>
    <dc:creator>nvaneck</dc:creator>
    <dc:date>2014-01-11T22:08:36Z</dc:date>
    <item>
      <title>CSV delimiter detection</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/CSV-delimiter-detection/m-p/956160#M93420</link>
      <description>&lt;P&gt;Is there anyway to accurately determine the delimiter used for CSV files in non-US countries?&amp;nbsp; There must be some way, as Excel knows what to do, but I can't find any way to determine in from &lt;FONT face="Consolas" size="2"&gt;&lt;FONT face="Consolas" size="2"&gt;NLSGETLOCALEINFO. Currently I try using the decimal delimiter from NLSGETLOCALEINFO, but I still need to try what comes back from NLSGETLOCALEINFO, and then try a ; if it fails.&amp;nbsp;This is not a failsafe way to do it....&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;

&lt;P&gt;The problem arises when importing a csv file created by Excel and I need to know what to scan for.&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;Thanks,&lt;BR /&gt;
	Neal Van Eck&lt;/P&gt;</description>
      <pubDate>Sat, 11 Jan 2014 13:18:05 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/CSV-delimiter-detection/m-p/956160#M93420</guid>
      <dc:creator>nvaneck</dc:creator>
      <dc:date>2014-01-11T13:18:05Z</dc:date>
    </item>
    <item>
      <title>In Excel the default local</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/CSV-delimiter-detection/m-p/956161#M93421</link>
      <description>&lt;P&gt;In Excel the default local settings for the csv separator character can be overridden by the user. The csv file is a plain text file without information about the origin, local settings and separator character which could be interrogated by a function. The simple solution is to have a look at the file content and guess from the text which character is the separator.&lt;/P&gt;</description>
      <pubDate>Sat, 11 Jan 2014 17:59:47 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/CSV-delimiter-detection/m-p/956161#M93421</guid>
      <dc:creator>rase</dc:creator>
      <dc:date>2014-01-11T17:59:47Z</dc:date>
    </item>
    <item>
      <title>Yes, I know that about CSV</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/CSV-delimiter-detection/m-p/956162#M93422</link>
      <description>&lt;P&gt;Yes, I know that about CSV files, but since the Excel file in question was just created by a call to Excel from my program, it must have some way to determine what separator to use, and so why can't I use the same method, whatever it is, to then interpret the just created csv file? At least that was what I hoped was possible. Other, non-Fortran, systems seem to be able to do this.&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 11 Jan 2014 18:14:09 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/CSV-delimiter-detection/m-p/956162#M93422</guid>
      <dc:creator>nvaneck</dc:creator>
      <dc:date>2014-01-11T18:14:09Z</dc:date>
    </item>
    <item>
      <title>It is the default separator</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/CSV-delimiter-detection/m-p/956163#M93423</link>
      <description>&lt;P&gt;It is the default list separator set in the regional settings. In some countries it is set to ; (semi colon) you can change it to whatever you want. If you are reading the file only in excel put the text sep=, on line one and excel will read it OK so long as it is a .csv file type.&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 11 Jan 2014 19:03:00 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/CSV-delimiter-detection/m-p/956163#M93423</guid>
      <dc:creator>andrew_4619</dc:creator>
      <dc:date>2014-01-11T19:03:00Z</dc:date>
    </item>
    <item>
      <title>That's encouraging, if there</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/CSV-delimiter-detection/m-p/956164#M93424</link>
      <description>&lt;P&gt;That's encouraging, if there is a way to retrieve the regional default list setting.&amp;nbsp; Other suggestions don't help because of the application I need:&lt;/P&gt;

&lt;P&gt;I let users click on a button for data entry with Excel, which opens a template with instruction for entering data field s characteristics and rows of records of data values. After Excel is closed with the file saved in CSV format, I open it and process the file. Thus there is no way to a priori &amp;nbsp;know what the separator is. What I need is a way to retrieve the regional list separator&amp;nbsp;setting.&amp;nbsp;&lt;/P&gt;

&lt;P&gt;Does anyone know how to retrieve this, or temporarily set it?&amp;nbsp; I'm searching on the internet, but nothing found so far outside of Excel, Java and VBA.&lt;/P&gt;

&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Sat, 11 Jan 2014 22:08:36 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/CSV-delimiter-detection/m-p/956164#M93424</guid>
      <dc:creator>nvaneck</dc:creator>
      <dc:date>2014-01-11T22:08:36Z</dc:date>
    </item>
    <item>
      <title>Why don't you let Excel save</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/CSV-delimiter-detection/m-p/956165#M93425</link>
      <description>&lt;P&gt;Why don't you let Excel save with whatever separator it wants to and then just detect this character when you read the file? If you have some fixed text in A1 and A2 you just need to read line 1 as text and find the character that separates after removing any white space padding.&lt;/P&gt;</description>
      <pubDate>Sat, 11 Jan 2014 22:40:34 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/CSV-delimiter-detection/m-p/956165#M93425</guid>
      <dc:creator>andrew_4619</dc:creator>
      <dc:date>2014-01-11T22:40:34Z</dc:date>
    </item>
    <item>
      <title>By the way I never found any</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/CSV-delimiter-detection/m-p/956166#M93426</link>
      <description>&lt;P&gt;By the way I never found any way of determining the character by window locale enquiry, there doesn't seem to be part of the locale even though it is in the regional and language settings.&lt;/P&gt;

&lt;P&gt;A similar problem hit me last year. I had a 'database' saved as CSV that my Fortran code read and used. A user could edit it externally using Excel. In some windows machines in some countries the CSV file did not read properly into Excel because it expected a semi-colons. My first fix was to add "sep=," to line one of the CSV file. This reads the file OK into Excel put fails when the user later saves the file as CSV as Excel fills it with semicolons not commas. In the end I chose to ditch CSV and do do all the reading/writing direct to the native xls or xlsx file as this is easier for the user. I could have opted for a solution like in my previous post #6 which would have been quicker and easier.&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 11 Jan 2014 22:54:33 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/CSV-delimiter-detection/m-p/956166#M93426</guid>
      <dc:creator>andrew_4619</dc:creator>
      <dc:date>2014-01-11T22:54:33Z</dc:date>
    </item>
    <item>
      <title>I'm doing what app4619</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/CSV-delimiter-detection/m-p/956167#M93427</link>
      <description>&lt;P&gt;I'm doing what app4619 suggests now but was hoping for an exact way&amp;nbsp; from the users settings.&amp;nbsp; This works, but another user option I have is to save an output report file as a csv file. At least in that case I can provide instructions when needed for viewing in Excel, or perhaps work something else out.&lt;/P&gt;

&lt;P&gt;Thanks all&lt;/P&gt;</description>
      <pubDate>Sat, 11 Jan 2014 23:09:44 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/CSV-delimiter-detection/m-p/956167#M93427</guid>
      <dc:creator>nvaneck</dc:creator>
      <dc:date>2014-01-11T23:09:44Z</dc:date>
    </item>
    <item>
      <title>I think you're looking at it</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/CSV-delimiter-detection/m-p/956168#M93428</link>
      <description>&lt;P&gt;I think you're looking at it the wrong way. The field delimiter Excel uses has nothing to do with locale, as far as I know. Even when you import a text file, you have to tell Excel what the delimiter is - typically comma or tab. Does it really behave differently in other locales? Excel typically will enclose values in quotes if any contain the delimiter.&lt;/P&gt;</description>
      <pubDate>Sun, 12 Jan 2014 00:58:03 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/CSV-delimiter-detection/m-p/956168#M93428</guid>
      <dc:creator>Steven_L_Intel1</dc:creator>
      <dc:date>2014-01-12T00:58:03Z</dc:date>
    </item>
    <item>
      <title>@ Steve. Yes it does change</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/CSV-delimiter-detection/m-p/956169#M93429</link>
      <description>&lt;P&gt;@ Steve. Yes it does change with locale (see attached screen grab) it is the list separator. However even though Windows sets this as a location preference it does not appear to be settable or gettable using the locale tools.&lt;/P&gt;

&lt;P&gt;This setting applies to the import and export of files with the .CSV extension where as far as excel goes the C in CSV does not mean comma it means the list separator from regional settings!&amp;nbsp;&lt;/P&gt;

&lt;P&gt;&lt;A href="http://office.microsoft.com/en-gb/excel-help/import-or-export-text-txt-or-csv-files-HP010342598.aspx"&gt;http://office.microsoft.com/en-gb/excel-help/import-or-export-text-txt-or-csv-files-HP010342598.aspx&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;The above link mostly helps but a slightly missing some bits off relevant information.&lt;/P&gt;</description>
      <pubDate>Sun, 12 Jan 2014 08:06:00 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/CSV-delimiter-detection/m-p/956169#M93429</guid>
      <dc:creator>andrew_4619</dc:creator>
      <dc:date>2014-01-12T08:06:00Z</dc:date>
    </item>
    <item>
      <title>As an addendum http://support</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/CSV-delimiter-detection/m-p/956170#M93430</link>
      <description>&lt;P&gt;As an addendum &lt;A href="http://support.microsoft.com/kb/266200/en-us"&gt;http://support.microsoft.com/kb/266200/en-us&lt;/A&gt;&amp;nbsp;is also relevant,&lt;/P&gt;</description>
      <pubDate>Sun, 12 Jan 2014 08:17:38 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/CSV-delimiter-detection/m-p/956170#M93430</guid>
      <dc:creator>andrew_4619</dc:creator>
      <dc:date>2014-01-12T08:17:38Z</dc:date>
    </item>
    <item>
      <title>The best information I found</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/CSV-delimiter-detection/m-p/956171#M93431</link>
      <description>&lt;P&gt;The best information I found on the internet over the years was&amp;nbsp; the statement:&lt;/P&gt;

&lt;P&gt;&lt;FONT face="Consolas" size="2"&gt;&lt;FONT face="Consolas" size="2"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; In language where &lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Consolas" size="2"&gt;&lt;FONT face="Consolas" size="2"&gt;the decimal separator is a ,(comma) the CSV separator is a ; (semicolon)&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;

&lt;P&gt;which is what I had been using since I can get the decimal separator, but recently&amp;nbsp;this didn't work for a user in Switzerland, which is why I started this thread in hopes someone knew how to get the local list separator.&amp;nbsp; There are a lot of queries on the internet for how to do this, spanning&amp;nbsp;many years, but no one seems to have a solution.&lt;/P&gt;

&lt;P&gt;Scanning the known structure of the file created by my data entry with Excel function solves the problem for me, and for importing other csv files I allow the user to specify the delimiter.&amp;nbsp;Saving a report file in CSV format still is an awkward problem without knowing the actual delimiter used locally (at least for Swiss users),&lt;/P&gt;

&lt;P&gt;It just seems strange that there is no way to get the local list separator within Fortran programmatically.&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 12 Jan 2014 13:47:46 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/CSV-delimiter-detection/m-p/956171#M93431</guid>
      <dc:creator>nvaneck</dc:creator>
      <dc:date>2014-01-12T13:47:46Z</dc:date>
    </item>
    <item>
      <title>Ok - the piece of information</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/CSV-delimiter-detection/m-p/956172#M93432</link>
      <description>&lt;P&gt;Ok - the piece of information you want is LOCALE_SLIST from the current locale.&lt;/P&gt;

&lt;P&gt;[fortran]&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp;&amp;nbsp; program ListSep&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp;&amp;nbsp; use kernel32&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp;&amp;nbsp; implicit none&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ! Variables&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp;&amp;nbsp; character(10) ::ls&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp;&amp;nbsp; integer :: lslen, i&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp;&amp;nbsp; lslen = GetLocaleInfo (LOCALE_USER_DEFAULT, LOCALE_SLIST, ls, len(ls))&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp;&amp;nbsp; ! Returns number of characters&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp;&amp;nbsp; print '(*(A))','List separator is "',ls(1:lslen-1),'"'&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp;&amp;nbsp; end program ListSep&lt;BR /&gt;
	[/fortran]&lt;/P&gt;

&lt;P&gt;This program might need tweaking if there is a multicharacter list separator (can be up to four characters!) Also, the function returns them as TCHARs and these might be double-byte. But I think this should work most of the time.&lt;/P&gt;</description>
      <pubDate>Sun, 12 Jan 2014 17:40:00 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/CSV-delimiter-detection/m-p/956172#M93432</guid>
      <dc:creator>Steven_L_Intel1</dc:creator>
      <dc:date>2014-01-12T17:40:00Z</dc:date>
    </item>
    <item>
      <title>Works great Steve,</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/CSV-delimiter-detection/m-p/956173#M93433</link>
      <description>&lt;P&gt;Works great Steve,&lt;/P&gt;

&lt;P&gt;I only knew about &lt;FONT face="Consolas" size="2"&gt;&lt;FONT face="Consolas" size="2"&gt;NLSGETLOCALEINFO, which doesn't seem to be able to retrieve the list&amp;nbsp;separator.&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;

&lt;P&gt;&lt;FONT face="Consolas" size="2"&gt;&lt;FONT face="Consolas" size="2"&gt;Thanks!&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 12 Jan 2014 22:32:34 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/CSV-delimiter-detection/m-p/956173#M93433</guid>
      <dc:creator>nvaneck</dc:creator>
      <dc:date>2014-01-12T22:32:34Z</dc:date>
    </item>
    <item>
      <title>@Steve. That is quite useful</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/CSV-delimiter-detection/m-p/956174#M93434</link>
      <description>&lt;P&gt;@Steve. That is quite useful thanks, I must have missed that when I scanned through the MSDN pages, there is a lot of info there!&amp;nbsp;&lt;/P&gt;

&lt;P&gt;@nvaneck, &amp;nbsp;I have found one or two things lacking in NLS in ifort which is only a partial implementation of all the options available. Also if you use the sdk direct not all the routines have interfaces under module KERNEL32 or the superset &amp;nbsp;IFWIN . There were newer things added for Vista onwards.&lt;/P&gt;</description>
      <pubDate>Sun, 12 Jan 2014 22:51:14 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/CSV-delimiter-detection/m-p/956174#M93434</guid>
      <dc:creator>andrew_4619</dc:creator>
      <dc:date>2014-01-12T22:51:14Z</dc:date>
    </item>
    <item>
      <title>Oh, ignore the declaration of</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/CSV-delimiter-detection/m-p/956175#M93435</link>
      <description>&lt;P&gt;Oh, ignore the declaration of i in that code - it's from an intermediate version I was playing with.&lt;/P&gt;</description>
      <pubDate>Mon, 13 Jan 2014 00:50:33 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/CSV-delimiter-detection/m-p/956175#M93435</guid>
      <dc:creator>Steven_L_Intel1</dc:creator>
      <dc:date>2014-01-13T00:50:33Z</dc:date>
    </item>
  </channel>
</rss>

