<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
    <title></title>
  </head>
  <body bgcolor="#ffffff" text="#000000">
    Hi Ross<br>
    <br>
    XE2 doesn't force you to store data in UTF-16 format. It is simply
    the encoding used internally by Delphi &gt; 2009 for strings.<br>
    <br>
    Todd.<br>
    <blockquote cite="mid:015701cda126$0c669110$2533b330$@com"
      type="cite">
      <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
      <meta name="Generator" content="Microsoft Word 12 (filtered
        medium)">
      <!--[if !mso]><style>v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style><![endif]-->
      <style><!--
/* Font Definitions */
@font-face
        {font-family:PMingLiU;
        panose-1:2 2 3 0 0 0 0 0 0 0;}
@font-face
        {font-family:PMingLiU;
        panose-1:2 2 3 0 0 0 0 0 0 0;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
        {font-family:Verdana;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
        {font-family:"\@PMingLiU";
        panose-1:2 2 3 0 0 0 0 0 0 0;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri","sans-serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
p
        {mso-style-priority:99;
        mso-margin-top-alt:auto;
        margin-right:0cm;
        mso-margin-bottom-alt:auto;
        margin-left:0cm;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
p.MsoAcetate, li.MsoAcetate, div.MsoAcetate
        {mso-style-priority:99;
        mso-style-link:"Balloon Text Char";
        margin:0cm;
        margin-bottom:.0001pt;
        font-size:8.0pt;
        font-family:"Tahoma","sans-serif";}
span.BalloonTextChar
        {mso-style-name:"Balloon Text Char";
        mso-style-priority:99;
        mso-style-link:"Balloon Text";
        font-family:"Tahoma","sans-serif";}
span.EmailStyle19
        {mso-style-type:personal;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
span.EmailStyle20
        {mso-style-type:personal;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
span.EmailStyle21
        {mso-style-type:personal;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
span.EmailStyle22
        {mso-style-type:personal;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
span.EmailStyle23
        {mso-style-type:personal;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
span.EmailStyle25
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
      <div class="WordSection1">
        <p class="MsoNormal"><span style="font-size: 12pt; color:
            rgb(31, 73, 125);">I know what your saying, but it won’t be
            a biggie if I upgrade one day.<o:p></o:p></span></p>
        <p class="MsoNormal"><span style="font-size: 12pt; color:
            rgb(31, 73, 125);"><o:p> </o:p></span></p>
        <p class="MsoNormal"><span style="font-size: 12pt; color:
            rgb(31, 73, 125);">I store filenames in text files on the
            hard drive and also in RAM, and some customers have 500,000+
            files.  Doubling the RAM and hard drive space requirements
            doesn’t appeal when most of my customers are in western
            countries.  That is my main reason to use UTF-8 over UTF-16.<o:p></o:p></span></p>
        <p class="MsoNormal"><span style="font-size: 12pt; color:
            rgb(31, 73, 125);"><o:p> </o:p></span></p>
        <p class="MsoNormal"><span style="font-size: 12pt; color:
            rgb(31, 73, 125);">Ross.<o:p></o:p></span></p>
        <p class="MsoNormal"><span style="font-size: 12pt; color:
            rgb(31, 73, 125);"><o:p> </o:p></span></p>
        <div>
          <div style="border-right: medium none; border-width: 1pt
            medium medium; border-style: solid none none; border-color:
            rgb(181, 196, 223) -moz-use-text-color -moz-use-text-color;
            padding: 3pt 0cm 0cm;">
            <p class="MsoNormal"><b><span style="font-size: 10pt;
                  font-family:
                  &quot;Tahoma&quot;,&quot;sans-serif&quot;;"
                  lang="EN-US">From:</span></b><span style="font-size:
                10pt; font-family:
                &quot;Tahoma&quot;,&quot;sans-serif&quot;;" lang="EN-US">
                <a class="moz-txt-link-abbreviated" href="mailto:delphi-bounces@listserver.123.net.nz">delphi-bounces@listserver.123.net.nz</a>
                [<a class="moz-txt-link-freetext" href="mailto:delphi-bounces@listserver.123.net.nz">mailto:delphi-bounces@listserver.123.net.nz</a>] <b>On
                  Behalf Of </b>John Bird<br>
                <b>Sent:</b> Wednesday, 3 October 2012 12:03 p.m.<br>
                <b>To:</b> <a class="moz-txt-link-abbreviated" href="mailto:muellers@orcl-toolbox.com">muellers@orcl-toolbox.com</a>; NZ Borland
                Developers Group - Delphi List<br>
                <b>Subject:</b> Re: [DUG] Unicode help in D7<o:p></o:p></span></p>
          </div>
        </div>
        <p class="MsoNormal"><o:p> </o:p></p>
        <div>
          <div>
            <div>
              <p class="MsoNormal"><span style="font-size: 12pt;
                  font-family:
                  &quot;Verdana&quot;,&quot;sans-serif&quot;; color:
                  navy;" lang="EN-US">I would second upgrading to
                  XE2/XE3 as almost all of the Unicode housekeeping is
                  done automatically in later versions of Delphi – and
                  if you start coding for AnsiChar/WideChar etc then you
                  will have considerable code to unwind when you do
                  convert as the workarounds are not needed<o:p></o:p></span></p>
            </div>
            <div>
              <p class="MsoNormal"><span style="font-size: 12pt;
                  font-family:
                  &quot;Verdana&quot;,&quot;sans-serif&quot;; color:
                  navy;" lang="EN-US"> <o:p></o:p></span></p>
            </div>
            <div>
              <p class="MsoNormal"><span style="font-size: 12pt;
                  font-family:
                  &quot;Verdana&quot;,&quot;sans-serif&quot;; color:
                  navy;" lang="EN-US">John Bird<o:p></o:p></span></p>
              <div>
                <div>
                  <div>
                    <p class="MsoNormal" style="background: none repeat
                      scroll 0% 0% whitesmoke;"><b><span
                          style="font-size: 10pt; font-family:
                          &quot;Tahoma&quot;,&quot;sans-serif&quot;;
                          color: navy;" lang="EN-US">From:</span></b><span
                        style="font-size: 10pt; font-family:
                        &quot;Tahoma&quot;,&quot;sans-serif&quot;;
                        color: navy;" lang="EN-US"> <a
                          moz-do-not-send="true"
                          href="mailto:muellers@orcl-toolbox.com"
                          title="muellers@orcl-toolbox.com">Stefan
                          Mueller</a> <o:p></o:p></span></p>
                  </div>
                  <div>
                    <p class="MsoNormal" style="background: none repeat
                      scroll 0% 0% whitesmoke;"><b><span
                          style="font-size: 10pt; font-family:
                          &quot;Tahoma&quot;,&quot;sans-serif&quot;;
                          color: navy;" lang="EN-US">Sent:</span></b><span
                        style="font-size: 10pt; font-family:
                        &quot;Tahoma&quot;,&quot;sans-serif&quot;;
                        color: navy;" lang="EN-US"> Tuesday, October 02,
                        2012 11:57 PM<o:p></o:p></span></p>
                  </div>
                  <div>
                    <p class="MsoNormal" style="background: none repeat
                      scroll 0% 0% whitesmoke;"><b><span
                          style="font-size: 10pt; font-family:
                          &quot;Tahoma&quot;,&quot;sans-serif&quot;;
                          color: navy;" lang="EN-US">To:</span></b><span
                        style="font-size: 10pt; font-family:
                        &quot;Tahoma&quot;,&quot;sans-serif&quot;;
                        color: navy;" lang="EN-US"> <a
                          moz-do-not-send="true"
                          href="mailto:delphi@listserver.123.net.nz"
                          title="delphi@listserver.123.net.nz">'NZ
                          Borland Developers Group - Delphi List'</a> <o:p></o:p></span></p>
                  </div>
                  <div>
                    <p class="MsoNormal" style="background: none repeat
                      scroll 0% 0% whitesmoke;"><b><span
                          style="font-size: 10pt; font-family:
                          &quot;Tahoma&quot;,&quot;sans-serif&quot;;
                          color: navy;" lang="EN-US">Subject:</span></b><span
                        style="font-size: 10pt; font-family:
                        &quot;Tahoma&quot;,&quot;sans-serif&quot;;
                        color: navy;" lang="EN-US"> Re: [DUG] Unicode
                        help in D7<o:p></o:p></span></p>
                  </div>
                </div>
              </div>
              <div>
                <p class="MsoNormal"><span style="font-size: 12pt;
                    font-family:
                    &quot;Verdana&quot;,&quot;sans-serif&quot;; color:
                    navy;" lang="EN-US"> <o:p></o:p></span></p>
              </div>
            </div>
            <div>
              <p class="MsoNormal"><span style="color: rgb(31, 73,
                  125);" lang="EN-US">The problem with storing Unicode
                  in utf8 is that the caller always needs to know
                  whether a string contains ansi or utf8 and that can
                  get messy/buggy real quick if you have a big project<o:p></o:p></span></p>
              <p class="MsoNormal"><span style="color: black;"
                  lang="EN-US"> </span><span style="color: rgb(31, 73,
                  125);" lang="EN-US"><o:p></o:p></span></p>
              <p class="MsoNormal"><span style="color: rgb(31, 73,
                  125);" lang="EN-US">I am sure you have thought about
                  it and you have your own reason. But as far as I am
                  concerned, if you go down that road to slowly Unicode
                  enable your application (including later on maybe Form
                  captions, labels, edits, listboxes, etc) then using
                  widestring and something like TNT library on delphi7
                  is the easiest way (or upgrade to &gt;delphi2009)<o:p></o:p></span></p>
              <p class="MsoNormal"><span style="color: black;"
                  lang="EN-US"> </span><span style="color: rgb(31, 73,
                  125);" lang="EN-US"><o:p></o:p></span></p>
              <p class="MsoNormal"><span style="font-size: 10pt;
                  font-family: &quot;Arial&quot;,&quot;sans-serif&quot;;
                  color: navy;" lang="EN-US"><br>
                </span><span style="font-size: 10pt; font-family:
                  &quot;Arial&quot;,&quot;sans-serif&quot;; color:
                  black;" lang="EN-US">Kind Regards,<br>
                  Stefan Mueller</span><span style="font-size: 10pt;
                  font-family: &quot;Arial&quot;,&quot;sans-serif&quot;;
                  color: rgb(88, 87, 87);" lang="EN-US"> <br>
                </span><span style="font-size: 10pt; font-family:
                  &quot;Arial&quot;,&quot;sans-serif&quot;; color:
                  rgb(102, 102, 153);" lang="EN-US">_______________________<br>
                  R&amp;D Manager<br>
                  ORCL Toolbox LLP, Japan<br>
                </span><span style="color: rgb(31, 73, 125);"
                  lang="EN-US"><a moz-do-not-send="true"
                    href="http://www.orcl-toolbox.com/"
                    title="blocked::http://www.orcl-toolbox.com/"><span
                      style="font-size: 10pt; font-family:
                      &quot;Arial&quot;,&quot;sans-serif&quot;;">http://www.orcl-toolbox.com</span></a><o:p></o:p></span></p>
              <p class="MsoNormal"><span style="color: black;"
                  lang="EN-US"> </span><span style="color: rgb(31, 73,
                  125);" lang="EN-US"><o:p></o:p></span></p>
              <p class="MsoNormal"><span style="color: black;"
                  lang="EN-US"> </span><span style="color: rgb(31, 73,
                  125);" lang="EN-US"><o:p></o:p></span></p>
              <div>
                <div style="border-right: medium none; border-width: 1pt
                  medium medium; border-style: solid none none;
                  border-color: rgb(181, 196, 223) -moz-use-text-color
                  -moz-use-text-color; padding: 3pt 0cm 0cm;">
                  <p class="MsoNormal"><b><span style="font-size: 10pt;
                        font-family:
                        &quot;Tahoma&quot;,&quot;sans-serif&quot;;
                        color: black;" lang="EN-US">From:</span></b><span
                      style="font-size: 10pt; font-family:
                      &quot;Tahoma&quot;,&quot;sans-serif&quot;; color:
                      black;" lang="EN-US"> <a moz-do-not-send="true"
                        href="mailto:delphi-bounces@listserver.123.net.nz">delphi-bounces@listserver.123.net.nz</a>
                      [<a moz-do-not-send="true"
                        href="mailto:delphi-bounces@listserver.123.net.nz">mailto:delphi-bounces@listserver.123.net.nz</a>]
                      <b>On Behalf Of </b>Ross Levis<br>
                      <b>Sent:</b> Tuesday, October 02, 2012 7:25 PM<br>
                      <b>To:</b> 'NZ Borland Developers Group - Delphi
                      List'<br>
                      <b>Subject:</b> Re: [DUG] Unicode help in D7<o:p></o:p></span></p>
                </div>
              </div>
              <p class="MsoNormal"><span style="color: black;"
                  lang="EN-US"> <o:p></o:p></span></p>
              <p class="MsoNormal"><span style="font-size: 12pt; color:
                  rgb(31, 73, 125);">I’ve hit a snag.<o:p></o:p></span></p>
              <p class="MsoNormal"><span style="color: black;"
                  lang="EN-US"> </span><span style="font-size: 12pt;
                  color: rgb(31, 73, 125);"><o:p></o:p></span></p>
              <p class="MsoNormal"><span style="font-size: 12pt; color:
                  rgb(31, 73, 125);">D7 defines IShellLinkW like this.<o:p></o:p></span></p>
              <p class="MsoNormal"><span style="color: black;"
                  lang="EN-US"> </span><span style="font-size: 12pt;
                  color: rgb(31, 73, 125);"><o:p></o:p></span></p>
              <p class="MsoNormal"><span style="font-size: 10pt;
                  font-family: &quot;Arial&quot;,&quot;sans-serif&quot;;
                  color: black;">  IShellLinkW = interface(IUnknown) {
                  sl }<o:p></o:p></span></p>
              <p class="MsoNormal"><span style="font-size: 10pt;
                  font-family: &quot;Arial&quot;,&quot;sans-serif&quot;;
                  color: black;">    [SID_IShellLinkW]<o:p></o:p></span></p>
              <p class="MsoNormal"><span style="font-size: 10pt;
                  font-family: &quot;Arial&quot;,&quot;sans-serif&quot;;
                  color: black;">    function GetPath(pszFile:
                  PWideChar; cchMaxPath: Integer;<o:p></o:p></span></p>
              <p class="MsoNormal"><span style="font-size: 10pt;
                  font-family: &quot;Arial&quot;,&quot;sans-serif&quot;;
                  color: black;">      var pfd: TWin32FindData; fFlags:
                  DWORD): HResult; stdcall;<o:p></o:p></span></p>
              <p class="MsoNormal"><span style="color: black;"
                  lang="EN-US"> </span><span style="font-size: 12pt;
                  color: rgb(31, 73, 125);"><o:p></o:p></span></p>
              <p class="MsoNormal"><span style="font-size: 12pt; color:
                  rgb(31, 73, 125);">I think the TWin32FindData should
                  be TWin32FindDataW.  I take it this is a bug, and I’ll
                  define my own one.<o:p></o:p></span></p>
              <p class="MsoNormal"><span style="color: black;"
                  lang="EN-US"> </span><span style="font-size: 12pt;
                  color: rgb(31, 73, 125);"><o:p></o:p></span></p>
              <p class="MsoNormal"><span style="font-size: 12pt; color:
                  rgb(31, 73, 125);">Ross.<o:p></o:p></span></p>
              <p class="MsoNormal"><span style="color: black;"
                  lang="EN-US"> </span><span style="font-size: 12pt;
                  color: rgb(31, 73, 125);"><o:p></o:p></span></p>
              <div>
                <div style="border-right: medium none; border-width: 1pt
                  medium medium; border-style: solid none none;
                  border-color: rgb(181, 196, 223) -moz-use-text-color
                  -moz-use-text-color; padding: 3pt 0cm 0cm;">
                  <p class="MsoNormal"><b><span style="font-size: 10pt;
                        font-family:
                        &quot;Tahoma&quot;,&quot;sans-serif&quot;;
                        color: black;" lang="EN-US">From:</span></b><span
                      style="font-size: 10pt; font-family:
                      &quot;Tahoma&quot;,&quot;sans-serif&quot;; color:
                      black;" lang="EN-US"> <a moz-do-not-send="true"
                        href="mailto:delphi-bounces@listserver.123.net.nz">delphi-bounces@listserver.123.net.nz</a>
                      <a moz-do-not-send="true"
                        href="mailto:[mailto:delphi-bounces@listserver.123.net.nz]">[mailto:delphi-bounces@listserver.123.net.nz]</a>
                      <b>On Behalf Of </b>Ross Levis<br>
                      <b>Sent:</b> Tuesday, 2 October 2012 10:58 p.m.<br>
                      <b>To:</b> 'NZ Borland Developers Group - Delphi
                      List'<br>
                      <b>Subject:</b> Re: [DUG] Unicode help in D7<o:p></o:p></span></p>
                </div>
              </div>
              <p class="MsoNormal"><span style="color: black;"
                  lang="EN-US"> </span><span style="color: black;"><o:p></o:p></span></p>
              <p class="MsoNormal"><span style="font-size: 12pt; color:
                  rgb(31, 73, 125);">Thanks for that.  I did download
                  some free 3<sup>rd</sup> party components and pas
                  files I found which include a TOpenDialogW,
                  WideFindFirst, WideFileExists, etc.  They should be
                  all I need.<o:p></o:p></span></p>
              <p class="MsoNormal"><span style="color: black;"
                  lang="EN-US"> </span><span style="font-size: 12pt;
                  color: rgb(31, 73, 125);"><o:p></o:p></span></p>
              <p class="MsoNormal"><span style="font-size: 12pt; color:
                  rgb(31, 73, 125);">I’ll actually be storing everything
                  in UTF8 and converting backwards and forwards to full
                  unicode as required for the Windows API.  That way I
                  can keep most of my code using the default AnsiString,
                  standard TStringLists, etc.<o:p></o:p></span></p>
              <p class="MsoNormal"><span style="color: black;"
                  lang="EN-US"> </span><span style="font-size: 12pt;
                  color: rgb(31, 73, 125);"><o:p></o:p></span></p>
              <p class="MsoNormal"><span style="font-size: 12pt; color:
                  rgb(31, 73, 125);">For me it would be useful if
                  someone had created a set of UTF8 components.  I find
                  it so much easier to work with.  I’ve created a
                  UTF8FileExists function, for example.  I suppose later
                  Delphi versions to the conversions automatically.<o:p></o:p></span></p>
              <p class="MsoNormal"><span style="color: black;"
                  lang="EN-US"> </span><span style="font-size: 12pt;
                  color: rgb(31, 73, 125);"><o:p></o:p></span></p>
              <p class="MsoNormal"><span style="font-size: 12pt; color:
                  rgb(31, 73, 125);">Cheers,<o:p></o:p></span></p>
              <p class="MsoNormal"><span style="font-size: 12pt; color:
                  rgb(31, 73, 125);">Ross.<o:p></o:p></span></p>
              <p class="MsoNormal"><span style="color: black;"
                  lang="EN-US"> </span><span style="font-size: 12pt;
                  color: rgb(31, 73, 125);"><o:p></o:p></span></p>
              <div>
                <div style="border-right: medium none; border-width: 1pt
                  medium medium; border-style: solid none none;
                  border-color: rgb(181, 196, 223) -moz-use-text-color
                  -moz-use-text-color; padding: 3pt 0cm 0cm;">
                  <p class="MsoNormal"><b><span style="font-size: 10pt;
                        font-family:
                        &quot;Tahoma&quot;,&quot;sans-serif&quot;;
                        color: black;" lang="EN-US">From:</span></b><span
                      style="font-size: 10pt; font-family:
                      &quot;Tahoma&quot;,&quot;sans-serif&quot;; color:
                      black;" lang="EN-US"> <a moz-do-not-send="true"
                        href="mailto:delphi-bounces@listserver.123.net.nz">delphi-bounces@listserver.123.net.nz</a>
                      [<a moz-do-not-send="true"
                        href="mailto:delphi-bounces@listserver.123.net.nz">mailto:delphi-bounces@listserver.123.net.nz</a>]
                      <b>On Behalf Of </b>Stefan Mueller<br>
                      <b>Sent:</b> Tuesday, 2 October 2012 9:22 p.m.<br>
                      <b>To:</b> 'NZ Borland Developers Group - Delphi
                      List'<br>
                      <b>Subject:</b> Re: [DUG] Unicode help in D7<o:p></o:p></span></p>
                </div>
              </div>
              <p class="MsoNormal"><span style="color: black;"
                  lang="EN-US"> </span><span style="color: black;"><o:p></o:p></span></p>
              <p class="MsoNormal"><span style="color: rgb(31, 73,
                  125);" lang="EN-US">The buffer has to be </span><span
                  style="color: rgb(31, 73, 125);">WideChar if you use
                  the IShellLinkW interface.<o:p></o:p></span></p>
              <p class="MsoNormal"><span style="color: black;"
                  lang="EN-US"> </span><span style="color: rgb(31, 73,
                  125);"><o:p></o:p></span></p>
              <p class="MsoNormal"><span style="color: rgb(31, 73,
                  125);">I also had my software unicodified with
                  delphi7. I used the TNT components (last free version
                  is here: </span><span style="color: black;"
                  lang="EN-US"><a moz-do-not-send="true"
                    href="http://www.axolot.com/TNT/">http://www.axolot.com/TNT/</a>
                  - it got bought out by TMS software: <a
                    moz-do-not-send="true"
                    href="http://www.tmssoftware.com/site/tmsuni.asp">http://www.tmssoftware.com/site/tmsuni.asp</a>
                  ) and that made things very easy.<o:p></o:p></span></p>
              <p class="MsoNormal"><span style="color: black;"
                  lang="EN-US"> <o:p></o:p></span></p>
              <p class="MsoNormal"><span style="color: black;"
                  lang="EN-US">The TNT component pack adds Unicode
                  enabled VCL-controls as well as Unicode Windows-API
                  support for many functions(FileOpen,FileCreate,etc)
                  and classes(WideStringList, etc). The library makes it
                  easy to be dealing with Unicode. </span><span
                  style="color: rgb(31, 73, 125);" lang="EN-US"><o:p></o:p></span></p>
              <p class="MsoNormal"><span style="color: black;"
                  lang="EN-US"> </span><span style="color: rgb(31, 73,
                  125);" lang="EN-US"><o:p></o:p></span></p>
              <div>
                <p class="MsoNormal"><span style="font-size: 10pt;
                    font-family:
                    &quot;Arial&quot;,&quot;sans-serif&quot;; color:
                    navy;" lang="EN-US"><br>
                  </span><span style="font-size: 10pt; font-family:
                    &quot;Arial&quot;,&quot;sans-serif&quot;; color:
                    black;" lang="EN-US">Kind Regards,<br>
                    Stefan Mueller</span><span style="font-size: 10pt;
                    font-family:
                    &quot;Arial&quot;,&quot;sans-serif&quot;; color:
                    rgb(88, 87, 87);" lang="EN-US"> <br>
                  </span><span style="font-size: 10pt; font-family:
                    &quot;Arial&quot;,&quot;sans-serif&quot;; color:
                    rgb(102, 102, 153);" lang="EN-US">_______________________<br>
                    R&amp;D Manager<br>
                    ORCL Toolbox LLP, Japan<br>
                  </span><span style="color: rgb(31, 73, 125);"
                    lang="EN-US"><a moz-do-not-send="true"
                      href="http://www.orcl-toolbox.com/"
                      title="blocked::http://www.orcl-toolbox.com/"><span
                        style="font-size: 10pt; font-family:
                        &quot;Arial&quot;,&quot;sans-serif&quot;;">http://www.orcl-toolbox.com</span></a><o:p></o:p></span></p>
                <p class="MsoNormal"><span style="color: black;"
                    lang="EN-US"> </span><span style="color: rgb(31, 73,
                    125);" lang="EN-US"><o:p></o:p></span></p>
              </div>
              <p class="MsoNormal"><span style="color: black;"
                  lang="EN-US"> </span><span style="color: rgb(31, 73,
                  125);" lang="EN-US"><o:p></o:p></span></p>
              <div>
                <div style="border-right: medium none; border-width: 1pt
                  medium medium; border-style: solid none none;
                  border-color: rgb(181, 196, 223) -moz-use-text-color
                  -moz-use-text-color; padding: 3pt 0cm 0cm;">
                  <p class="MsoNormal"><b><span style="font-size: 10pt;
                        font-family:
                        &quot;Tahoma&quot;,&quot;sans-serif&quot;;
                        color: black;" lang="EN-US">From:</span></b><span
                      style="font-size: 10pt; font-family:
                      &quot;Tahoma&quot;,&quot;sans-serif&quot;; color:
                      black;" lang="EN-US"> <a moz-do-not-send="true"
                        href="mailto:delphi-bounces@listserver.123.net.nz">delphi-bounces@listserver.123.net.nz</a>
                      [<a moz-do-not-send="true"
                        href="mailto:delphi-bounces@listserver.123.net.nz">mailto:delphi-bounces@listserver.123.net.nz</a>]
                      <b>On Behalf Of </b>Ross Levis<br>
                      <b>Sent:</b> Tuesday, October 02, 2012 5:00 PM<br>
                      <b>To:</b> 'NZ Borland Developers Group - Delphi
                      List'<br>
                      <b>Subject:</b> [DUG] Unicode help in D7<o:p></o:p></span></p>
                </div>
              </div>
              <p class="MsoNormal"><span style="color: black;"
                  lang="EN-US"> <o:p></o:p></span></p>
              <p class="MsoNormal"><span style="font-size: 12pt; color:
                  rgb(31, 73, 125);">I’m adding a small amount of
                  Unicode support in my D7 app to enable opening files
                  where the filenames are in foreign languages. 
                  Currently my app can’t even open these files.  I’ve
                  installed an OpenFile dialog which provides WideString
                  results.<o:p></o:p></span></p>
              <p class="MsoNormal"><span style="color: black;"
                  lang="EN-US"> </span><span style="font-size: 12pt;
                  color: rgb(31, 73, 125);"><o:p></o:p></span></p>
              <p class="MsoNormal"><span style="font-size: 12pt; color:
                  rgb(31, 73, 125);">One thing I need is to resolve
                  shortcuts.  I have converted the following function
                  which I had for ANSI filenames into Unicode.  Just
                  IShellLinkW and TWin32FindDataW changed.<o:p></o:p></span></p>
              <p class="MsoNormal"><span style="color: black;"
                  lang="EN-US"> </span><span style="font-size: 12pt;
                  color: rgb(31, 73, 125);"><o:p></o:p></span></p>
              <p class="MsoNormal"><b><span style="font-size: 9pt;
                    font-family:
                    &quot;Arial&quot;,&quot;sans-serif&quot;; color:
                    black;">function ResolveShortcut(const LinkPath:
                    WideString): WideString;<o:p></o:p></span></b></p>
              <p class="MsoNormal"><b><span style="font-size: 9pt;
                    font-family:
                    &quot;Arial&quot;,&quot;sans-serif&quot;; color:
                    black;">var<o:p></o:p></span></b></p>
              <p class="MsoNormal"><b><span style="font-size: 9pt;
                    font-family:
                    &quot;Arial&quot;,&quot;sans-serif&quot;; color:
                    black;">ShellLink: IShellLinkW<o:p></o:p></span></b></p>
              <p class="MsoNormal"><b><span style="font-size: 9pt;
                    font-family:
                    &quot;Arial&quot;,&quot;sans-serif&quot;; color:
                    black;">  FindData: TWin32FindDataW;<o:p></o:p></span></b></p>
              <p class="MsoNormal"><b><span style="font-size: 9pt;
                    font-family:
                    &quot;Arial&quot;,&quot;sans-serif&quot;; color:
                    black;">  buff: Array [0..Max_Path-1] of Char;<o:p></o:p></span></b></p>
              <p class="MsoNormal"><b><span style="font-size: 9pt;
                    font-family:
                    &quot;Arial&quot;,&quot;sans-serif&quot;; color:
                    black;">begin<o:p></o:p></span></b></p>
              <p class="MsoNormal"><b><span style="font-size: 9pt;
                    font-family:
                    &quot;Arial&quot;,&quot;sans-serif&quot;; color:
                    black;">  ShellLink :=
                    CreateComObject(CLSID_ShellLink) as IShellLinkW;<o:p></o:p></span></b></p>
              <p class="MsoNormal"><b><span style="font-size: 9pt;
                    font-family:
                    &quot;Arial&quot;,&quot;sans-serif&quot;; color:
                    black;">PersistFile := ShellLink as IPersistFile;<o:p></o:p></span></b></p>
              <p class="MsoNormal"><b><span style="font-size: 9pt;
                    font-family:
                    &quot;Arial&quot;,&quot;sans-serif&quot;; color:
                    black;">  if
                    (PersistFile.Load(PWideChar(LinkPath),STGM_READ) =
                    S_OK) and<o:p></o:p></span></b></p>
              <p class="MsoNormal"><b><span style="font-size: 9pt;
                    font-family:
                    &quot;Arial&quot;,&quot;sans-serif&quot;; color:
                    black;">   (ShellLink.Resolve(Application.Handle,
                    SLR_NO_UI) = NOERROR) and<o:p></o:p></span></b></p>
              <p class="MsoNormal"><b><span style="font-size: 9pt;
                    font-family:
                    &quot;Arial&quot;,&quot;sans-serif&quot;; color:
                    black;">  
                    (ShellLink.GetPath(buff,MAX_PATH,FindData,SLGP_UNCPRIORITY)=
                    NOERROR) then<o:p></o:p></span></b></p>
              <p class="MsoNormal"><b><span style="font-size: 9pt;
                    font-family:
                    &quot;Arial&quot;,&quot;sans-serif&quot;; color:
                    black;">    Result := buff<o:p></o:p></span></b></p>
              <p class="MsoNormal"><b><span style="font-size: 9pt;
                    font-family:
                    &quot;Arial&quot;,&quot;sans-serif&quot;; color:
                    black;">  else Result := ''<o:p></o:p></span></b></p>
              <p class="MsoNormal"><b><span style="font-size: 9pt;
                    font-family:
                    &quot;Arial&quot;,&quot;sans-serif&quot;; color:
                    black;">end;<o:p></o:p></span></b></p>
              <p class="MsoNormal"><span style="color: black;"
                  lang="EN-US"> </span><span style="font-size: 12pt;
                  color: rgb(31, 73, 125);"><o:p></o:p></span></p>
              <p class="MsoNormal"><span style="font-size: 12pt; color:
                  rgb(31, 73, 125);">But I’m not sure if the buff array
                  should be of WideChar or left as Char.<o:p></o:p></span></p>
              <p class="MsoNormal"><span style="color: black;"
                  lang="EN-US"> </span><span style="font-size: 12pt;
                  color: rgb(31, 73, 125);"><o:p></o:p></span></p>
              <p class="MsoNormal"><span style="font-size: 12pt; color:
                  rgb(31, 73, 125);">Does MAX_PATH assume wide
                  characters?<o:p></o:p></span></p>
              <p class="MsoNormal"><span style="color: black;"
                  lang="EN-US"> </span><span style="font-size: 12pt;
                  color: rgb(31, 73, 125);"><o:p></o:p></span></p>
              <p class="MsoNormal"><span style="font-size: 12pt; color:
                  rgb(31, 73, 125);">Thanks,<o:p></o:p></span></p>
              <p class="MsoNormal"><span style="font-size: 12pt; color:
                  rgb(31, 73, 125);">Ross.<o:p></o:p></span></p>
              <div class="MsoNormal" style="text-align: center;"
                align="center"><span style="font-size: 12pt; color:
                  black;" lang="EN-US">
                  <hr size="3" align="center" width="100%"></span></div>
              <p class="MsoNormal"><span style="font-size: 12pt; color:
                  black;" lang="EN-US">_______________________________________________<br>
                  NZ Borland Developers Group - Delphi mailing list<br>
                  Post: <a moz-do-not-send="true"
                    href="mailto:delphi@listserver.123.net.nz">delphi@listserver.123.net.nz</a><br>
                  Admin: <a moz-do-not-send="true"
                    href="http://delphi.org.nz/mailman/listinfo/delphi">http://delphi.org.nz/mailman/listinfo/delphi</a><br>
                  Unsubscribe: send an email to <a
                    moz-do-not-send="true"
                    href="mailto:delphi-request@listserver.123.net.nz">delphi-request@listserver.123.net.nz</a>
                  with Subject: unsubscribe<o:p></o:p></span></p>
            </div>
          </div>
        </div>
      </div>
      <pre wrap="">
<fieldset class="mimeAttachmentHeader"></fieldset>
_______________________________________________
NZ Borland Developers Group - Delphi mailing list
Post: <a class="moz-txt-link-abbreviated" href="mailto:delphi@listserver.123.net.nz">delphi@listserver.123.net.nz</a>
Admin: <a class="moz-txt-link-freetext" href="http://delphi.org.nz/mailman/listinfo/delphi">http://delphi.org.nz/mailman/listinfo/delphi</a>
Unsubscribe: send an email to <a class="moz-txt-link-abbreviated" href="mailto:delphi-request@listserver.123.net.nz">delphi-request@listserver.123.net.nz</a> with Subject: unsubscribe</pre>
    </blockquote>
    <br>
    <br>
    <div class="moz-signature">-- <br>
      <i>Fortune</i> favours the <b>brave</b></div>
  </body>
</html>