<?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 Re: Code to write a registry (.reg) file in Intel® Fortran Compiler</title>
    <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Code-to-write-a-registry-reg-file/m-p/1273425#M155502</link>
    <description>&lt;P&gt;When I export a .reg file I get a text file (on my system it is encoded UCS2 LE BOM but ANSI should be OK) with CRLF at the end of every line. Attach your 2 reg files you are comparing.&lt;/P&gt;</description>
    <pubDate>Wed, 14 Apr 2021 06:22:45 GMT</pubDate>
    <dc:creator>andrew_4619</dc:creator>
    <dc:date>2021-04-14T06:22:45Z</dc:date>
    <item>
      <title>Code to write a registry (.reg) file</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Code-to-write-a-registry-reg-file/m-p/1273212#M155489</link>
      <description>&lt;P&gt;A registry (.reg) file looks a little removed from a regular text, no doubt a lot to do with us of unicode, but also other strange bytes.&amp;nbsp; Is there a bit of Fortran code which will write a .reg file in the required format?&lt;/P&gt;</description>
      <pubDate>Tue, 13 Apr 2021 12:53:56 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Code-to-write-a-registry-reg-file/m-p/1273212#M155489</guid>
      <dc:creator>ferrad1</dc:creator>
      <dc:date>2021-04-13T12:53:56Z</dc:date>
    </item>
    <item>
      <title>Re: Code to write a registry (.reg) file</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Code-to-write-a-registry-reg-file/m-p/1273233#M155491</link>
      <description>&lt;P&gt;You can write all ask plain text, binary records have a type deliminator and then comma separated hex values. A simple reg file write could be 10 lines of code. Look at the wiki page.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 13 Apr 2021 14:33:08 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Code-to-write-a-registry-reg-file/m-p/1273233#M155491</guid>
      <dc:creator>andrew_4619</dc:creator>
      <dc:date>2021-04-13T14:33:08Z</dc:date>
    </item>
    <item>
      <title>Re: Code to write a registry (.reg) file</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Code-to-write-a-registry-reg-file/m-p/1273345#M155497</link>
      <description>&lt;P&gt;Ok, I've written a .reg file which writes an identical file to the one that is exported from regedit, with exception of an extra 0D0A at the end of the file.&amp;nbsp; I tried ADVANCE=NO in the format statement, but it still writes these extra 2 bytes.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="ferrad1_0-1618366614760.png" style="width: 676px;"&gt;&lt;img src="https://community.intel.com/t5/image/serverpage/image-id/16333iDC3A586918605E35/image-size/medium/is-moderation-mode/true?v=v2&amp;amp;px=400&amp;amp;whitelist-exif-data=Orientation%2CResolution%2COriginalDefaultFinalSize%2CCopyright" role="button" title="ferrad1_0-1618366614760.png" alt="ferrad1_0-1618366614760.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Any idea how to suppress them?&lt;/P&gt;</description>
      <pubDate>Wed, 14 Apr 2021 02:17:13 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Code-to-write-a-registry-reg-file/m-p/1273345#M155497</guid>
      <dc:creator>ferrad1</dc:creator>
      <dc:date>2021-04-14T02:17:13Z</dc:date>
    </item>
    <item>
      <title>Re: Code to write a registry (.reg) file</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Code-to-write-a-registry-reg-file/m-p/1273399#M155501</link>
      <description>&lt;P&gt;Use ACCESS='STREAM' and FORM='UNFORMATTED' to write direct binary.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 14 Apr 2021 03:42:14 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Code-to-write-a-registry-reg-file/m-p/1273399#M155501</guid>
      <dc:creator>Steve_Lionel</dc:creator>
      <dc:date>2021-04-14T03:42:14Z</dc:date>
    </item>
    <item>
      <title>Re: Code to write a registry (.reg) file</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Code-to-write-a-registry-reg-file/m-p/1273425#M155502</link>
      <description>&lt;P&gt;When I export a .reg file I get a text file (on my system it is encoded UCS2 LE BOM but ANSI should be OK) with CRLF at the end of every line. Attach your 2 reg files you are comparing.&lt;/P&gt;</description>
      <pubDate>Wed, 14 Apr 2021 06:22:45 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Code-to-write-a-registry-reg-file/m-p/1273425#M155502</guid>
      <dc:creator>andrew_4619</dc:creator>
      <dc:date>2021-04-14T06:22:45Z</dc:date>
    </item>
    <item>
      <title>Re: Code to write a registry (.reg) file</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Code-to-write-a-registry-reg-file/m-p/1273501#M155506</link>
      <description>&lt;P&gt;I tried access='stream' and form='unformatted' but I still get the stray 0d 0a at the end of the file.&lt;/P&gt;
&lt;P&gt;Reg files attached (renamed as .txt)&lt;/P&gt;</description>
      <pubDate>Wed, 14 Apr 2021 12:54:46 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Code-to-write-a-registry-reg-file/m-p/1273501#M155506</guid>
      <dc:creator>ferrad1</dc:creator>
      <dc:date>2021-04-14T12:54:46Z</dc:date>
    </item>
    <item>
      <title>Re: Code to write a registry (.reg) file</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Code-to-write-a-registry-reg-file/m-p/1273511#M155507</link>
      <description>&lt;P&gt;Both files have CR LF&amp;nbsp; (0D00 0A00) twice at the end in double byte character format (Bigendian) but in the one you write an additional CRLF&amp;nbsp; (0D0A) is output in single byte format at the end. However I an not trusting anything I see in a text editor I would want to read type bytes as a stream byte by byte and check that.&lt;/P&gt;</description>
      <pubDate>Wed, 14 Apr 2021 13:58:34 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Code-to-write-a-registry-reg-file/m-p/1273511#M155507</guid>
      <dc:creator>andrew_4619</dc:creator>
      <dc:date>2021-04-14T13:58:34Z</dc:date>
    </item>
    <item>
      <title>Re: Code to write a registry (.reg) file</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Code-to-write-a-registry-reg-file/m-p/1273518#M155510</link>
      <description>&lt;P&gt;Yes, the file I write has an extra od oa at the end (which I don't write).&amp;nbsp; The regedit exported one doesn't.&lt;/P&gt;
&lt;P&gt;I look at them in&amp;nbsp;&lt;A href="https://hexed.it/" target="_blank"&gt;https://hexed.it/&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 14 Apr 2021 14:11:56 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Code-to-write-a-registry-reg-file/m-p/1273518#M155510</guid>
      <dc:creator>ferrad1</dc:creator>
      <dc:date>2021-04-14T14:11:56Z</dc:date>
    </item>
    <item>
      <title>Re: Code to write a registry (.reg) file</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Code-to-write-a-registry-reg-file/m-p/1273539#M155516</link>
      <description>&lt;P&gt;Well I am not sure what is happening here. When I write a text file from Fortran I get an ANSI/UTF-8 file with single byte characters. Your file is double byte encoded and then has a EOF in single byte format. But the Fortran runtime as I see it only supports ANSI for formatted (text) files.&amp;nbsp; Do you gave an example code a few lines showing the open, write and close so we can test/replicate? Someone else may be able to see the problem but I think I would need to plod through step by step through what you are doing.&lt;/P&gt;</description>
      <pubDate>Wed, 14 Apr 2021 15:02:44 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Code-to-write-a-registry-reg-file/m-p/1273539#M155516</guid>
      <dc:creator>andrew_4619</dc:creator>
      <dc:date>2021-04-14T15:02:44Z</dc:date>
    </item>
    <item>
      <title>Re: Code to write a registry (.reg) file</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Code-to-write-a-registry-reg-file/m-p/1273541#M155517</link>
      <description>&lt;P&gt;Here is the code, with the middle portion stripped out, but you can get the idea:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;      open(unit=2,file='aqreg.reg',status='unknown')
      write(2,'(a)',advance='no') &amp;amp;
      char(z'ff')//char(z'fe')//char(z'57')//char(z'00')//char(z'69')//char(z'00')//char(z'6e')//char(z'00')//char(z'64')//char(z'00')//char(z'6f')//char(z'00')//char(z'77')//char(z'00')//char(z'73')//char(z'00')//&amp;amp;
      char(z'0d')//char(z'00')//char(z'0a')//char(z'00')//char(z'0d')//char(z'00')//char(z'0a')//char(z'00')
      close(unit=2)&lt;/LI-CODE&gt;</description>
      <pubDate>Wed, 14 Apr 2021 15:07:44 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Code-to-write-a-registry-reg-file/m-p/1273541#M155517</guid>
      <dc:creator>ferrad1</dc:creator>
      <dc:date>2021-04-14T15:07:44Z</dc:date>
    </item>
    <item>
      <title>Re: Code to write a registry (.reg) file</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Code-to-write-a-registry-reg-file/m-p/1273542#M155518</link>
      <description>&lt;P&gt;You're writing with formatted output, which will always add a line terminator (CR-LF) at the end of each record. Using ADVANCE='NO' doesn't stop this. The only way to avoid getting the terminators is to use unformatted, stream output.&lt;/P&gt;</description>
      <pubDate>Wed, 14 Apr 2021 15:11:16 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Code-to-write-a-registry-reg-file/m-p/1273542#M155518</guid>
      <dc:creator>Steve_Lionel</dc:creator>
      <dc:date>2021-04-14T15:11:16Z</dc:date>
    </item>
    <item>
      <title>Re: Code to write a registry (.reg) file</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Code-to-write-a-registry-reg-file/m-p/1273583#M155526</link>
      <description>&lt;P&gt;I still get the 0d 0a:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="ferrad1_0-1618418940098.png" style="width: 400px;"&gt;&lt;img src="https://community.intel.com/t5/image/serverpage/image-id/16342i270EFA02E59FD84B/image-size/medium/is-moderation-mode/true?v=v2&amp;amp;px=400&amp;amp;whitelist-exif-data=Orientation%2CResolution%2COriginalDefaultFinalSize%2CCopyright" role="button" title="ferrad1_0-1618418940098.png" alt="ferrad1_0-1618418940098.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;      open(unit=2,file='aqcomp.inc',status='unknown',access='stream',form='unformatted')
      write(2) ecstring
      close(unit=2)
&lt;/LI-CODE&gt;
&lt;P&gt;ecstring is of length 55&lt;/P&gt;</description>
      <pubDate>Wed, 14 Apr 2021 16:50:18 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Code-to-write-a-registry-reg-file/m-p/1273583#M155526</guid>
      <dc:creator>ferrad1</dc:creator>
      <dc:date>2021-04-14T16:50:18Z</dc:date>
    </item>
    <item>
      <title>Re: Code to write a registry (.reg) file</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Code-to-write-a-registry-reg-file/m-p/1273643#M155530</link>
      <description>&lt;P&gt;The most recent file is not remotely something that the registry editor would accept for an import.&lt;/P&gt;
&lt;P&gt;I cannot reproduce the extra CR-LF using a recent compilers.&lt;/P&gt;
&lt;P&gt;(Use of a hardcoded unit number below 10 makes me nervous - prefer a value obtained using the NEWUNIT specifier, but that does not appear to be the issue here.)&lt;/P&gt;
&lt;P&gt;The registry editor will import "ansi" encoded files (as would be written by normal/boring Fortran formatted write statements), so none of this should be necessary.&amp;nbsp; When checking the results of an import, be mindful of registry redirection - are you looking in the right place?&lt;/P&gt;
&lt;P&gt;(From a Fortran language point of view, the easiest way to write UTF-16LE encoded files is via an appropriate ENCODING specifier in the OPEN statement.&amp;nbsp; But Fortran processor support for different encodings is processor dependent, and the Intel Fortran runtime does not support UTF-16LE encoding.)&lt;/P&gt;</description>
      <pubDate>Wed, 14 Apr 2021 21:00:51 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Code-to-write-a-registry-reg-file/m-p/1273643#M155530</guid>
      <dc:creator>IanH</dc:creator>
      <dc:date>2021-04-14T21:00:51Z</dc:date>
    </item>
    <item>
      <title>Re: Code to write a registry (.reg) file</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Code-to-write-a-registry-reg-file/m-p/1273645#M155532</link>
      <description>&lt;P&gt;Yes I know this is not a registry file, I was just experimenting with dummy code.&amp;nbsp; I did run your code and I did not get the trailing 0d 0a, so it must be something in my code or compilation options.&amp;nbsp; Thanks for helping out.&lt;/P&gt;</description>
      <pubDate>Wed, 14 Apr 2021 21:15:26 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Code-to-write-a-registry-reg-file/m-p/1273645#M155532</guid>
      <dc:creator>ferrad1</dc:creator>
      <dc:date>2021-04-14T21:15:26Z</dc:date>
    </item>
  </channel>
</rss>

