<HTML xmlns="http://www.w3.org/TR/REC-html40" xmlns:v =
"urn:schemas-microsoft-com:vml" xmlns:o =
"urn:schemas-microsoft-com:office:office" xmlns:w =
"urn:schemas-microsoft-com:office:word" xmlns:m =
"http://schemas.microsoft.com/office/2004/12/omml"><HEAD>
<META content="text/html; charset=utf-8" http-equiv=Content-Type>
<META name=Generator content="Microsoft Word 12 (filtered medium)">
<STYLE>v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
..shape {behavior:url(#default#VML);}
</STYLE>
<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>
</HEAD>
<BODY dir=ltr lang=EN-NZ vLink=purple link=blue>
<DIV dir=ltr>
<DIV style="FONT-FAMILY: 'Verdana'; COLOR: #000080; FONT-SIZE: 12pt">
<DIV>Thats one of the advantages of how they did the upgrade – if you use the
same D7 code on XE2/3 and using standard methods of writing to files such as
FileStream or TStringlist.savetofile then you will find that the strings in
memory are Unicode, and saved to disk will be ANSI by default (you have to
specify to save as Unicode as a format to get it). ie it is pretty
close to “it just works”. Source code similarly remains ANSI until you
start saving Unicode strings – in that case it automatically switches to
unicode.</DIV>
<DIV> </DIV>
<DIV style="FONT-FAMILY: 'Verdana'; COLOR: #000080; FONT-SIZE: 12pt">John
Bird<BR>
<DIV
style="FONT-STYLE: normal; DISPLAY: inline; FONT-FAMILY: 'Calibri'; COLOR: #000000; FONT-SIZE: small; FONT-WEIGHT: normal; TEXT-DECORATION: none"></DIV>
<DIV style="FONT: 10pt tahoma">
<DIV style="BACKGROUND: #f5f5f5">
<DIV style="font-color: black"><B>From:</B> <A title=ross@stationplaylist.com
href="mailto:ross@stationplaylist.com">Ross Levis</A> </DIV>
<DIV><B>Sent:</B> Wednesday, October 03, 2012 6:15 PM</DIV>
<DIV><B>To:</B> <A title=delphi@listserver.123.net.nz
href="mailto:delphi@listserver.123.net.nz">'NZ Borland Developers Group - Delphi
List'</A> </DIV>
<DIV><B>Subject:</B> Re: [DUG] Unicode help in D7</DIV></DIV></DIV>
<DIV> </DIV></DIV>
<DIV
style="FONT-STYLE: normal; DISPLAY: inline; FONT-FAMILY: 'Calibri'; COLOR: #000000; FONT-SIZE: small; FONT-WEIGHT: normal; TEXT-DECORATION: none">
<DIV class=WordSection1>
<P class=MsoNormal><SPAN style="COLOR: #1f497d; FONT-SIZE: 12pt">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="COLOR: #1f497d; FONT-SIZE: 12pt"><o:p></o:p></SPAN> </P>
<P class=MsoNormal><SPAN style="COLOR: #1f497d; FONT-SIZE: 12pt">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="COLOR: #1f497d; FONT-SIZE: 12pt"><o:p></o:p></SPAN> </P>
<P class=MsoNormal><SPAN
style="COLOR: #1f497d; FONT-SIZE: 12pt">Ross.<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN
style="COLOR: #1f497d; FONT-SIZE: 12pt"><o:p></o:p></SPAN> </P>
<DIV>
<DIV
style="BORDER-BOTTOM: medium none; BORDER-LEFT: medium none; PADDING-BOTTOM: 0cm; PADDING-LEFT: 0cm; PADDING-RIGHT: 0cm; BORDER-TOP: #b5c4df 1pt solid; BORDER-RIGHT: medium none; PADDING-TOP: 3pt">
<P class=MsoNormal><B><SPAN
style="FONT-FAMILY: 'Tahoma','sans-serif'; FONT-SIZE: 10pt"
lang=EN-US>From:</SPAN></B><SPAN
style="FONT-FAMILY: 'Tahoma','sans-serif'; FONT-SIZE: 10pt" lang=EN-US>
delphi-bounces@listserver.123.net.nz
[mailto:delphi-bounces@listserver.123.net.nz] <B>On Behalf Of </B>John
Bird<BR><B>Sent:</B> Wednesday, 3 October 2012 12:03 p.m.<BR><B>To:</B>
muellers@orcl-toolbox.com; 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-FAMILY: 'Verdana','sans-serif'; COLOR: navy; FONT-SIZE: 12pt"
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-FAMILY: 'Verdana','sans-serif'; COLOR: navy; FONT-SIZE: 12pt"
lang=EN-US> <o:p></o:p></SPAN></P></DIV>
<DIV>
<P class=MsoNormal><SPAN
style="FONT-FAMILY: 'Verdana','sans-serif'; COLOR: navy; FONT-SIZE: 12pt"
lang=EN-US>John Bird<o:p></o:p></SPAN></P>
<DIV>
<DIV>
<DIV>
<P style="BACKGROUND: whitesmoke" class=MsoNormal><B><SPAN
style="FONT-FAMILY: 'Tahoma','sans-serif'; COLOR: navy; FONT-SIZE: 10pt"
lang=EN-US>From:</SPAN></B><SPAN
style="FONT-FAMILY: 'Tahoma','sans-serif'; COLOR: navy; FONT-SIZE: 10pt"
lang=EN-US> <A title=muellers@orcl-toolbox.com
href="mailto:muellers@orcl-toolbox.com">Stefan Mueller</A>
<o:p></o:p></SPAN></P></DIV>
<DIV>
<P style="BACKGROUND: whitesmoke" class=MsoNormal><B><SPAN
style="FONT-FAMILY: 'Tahoma','sans-serif'; COLOR: navy; FONT-SIZE: 10pt"
lang=EN-US>Sent:</SPAN></B><SPAN
style="FONT-FAMILY: 'Tahoma','sans-serif'; COLOR: navy; FONT-SIZE: 10pt"
lang=EN-US> Tuesday, October 02, 2012 11:57 PM<o:p></o:p></SPAN></P></DIV>
<DIV>
<P style="BACKGROUND: whitesmoke" class=MsoNormal><B><SPAN
style="FONT-FAMILY: 'Tahoma','sans-serif'; COLOR: navy; FONT-SIZE: 10pt"
lang=EN-US>To:</SPAN></B><SPAN
style="FONT-FAMILY: 'Tahoma','sans-serif'; COLOR: navy; FONT-SIZE: 10pt"
lang=EN-US> <A title=delphi@listserver.123.net.nz
href="mailto:delphi@listserver.123.net.nz">'NZ Borland Developers Group - Delphi
List'</A> <o:p></o:p></SPAN></P></DIV>
<DIV>
<P style="BACKGROUND: whitesmoke" class=MsoNormal><B><SPAN
style="FONT-FAMILY: 'Tahoma','sans-serif'; COLOR: navy; FONT-SIZE: 10pt"
lang=EN-US>Subject:</SPAN></B><SPAN
style="FONT-FAMILY: 'Tahoma','sans-serif'; COLOR: navy; FONT-SIZE: 10pt"
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-FAMILY: 'Verdana','sans-serif'; COLOR: navy; FONT-SIZE: 12pt"
lang=EN-US> <o:p></o:p></SPAN></P></DIV></DIV>
<DIV>
<P class=MsoNormal><SPAN style="COLOR: #1f497d" 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: #1f497d" lang=EN-US><o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN style="COLOR: #1f497d" 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
>delphi2009)<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN style="COLOR: black" lang=EN-US> </SPAN><SPAN
style="COLOR: #1f497d" lang=EN-US><o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN
style="FONT-FAMILY: 'Arial','sans-serif'; COLOR: navy; FONT-SIZE: 10pt"
lang=EN-US><BR></SPAN><SPAN
style="FONT-FAMILY: 'Arial','sans-serif'; COLOR: black; FONT-SIZE: 10pt"
lang=EN-US>Kind Regards,<BR>Stefan Mueller</SPAN><SPAN
style="FONT-FAMILY: 'Arial','sans-serif'; COLOR: #585757; FONT-SIZE: 10pt"
lang=EN-US> <BR></SPAN><SPAN
style="FONT-FAMILY: 'Arial','sans-serif'; COLOR: #666699; FONT-SIZE: 10pt"
lang=EN-US>_______________________<BR>R&D Manager<BR>ORCL Toolbox LLP,
Japan<BR></SPAN><SPAN style="COLOR: #1f497d" lang=EN-US><A
title=blocked::http://www.orcl-toolbox.com/
href="http://www.orcl-toolbox.com/"><SPAN
style="FONT-FAMILY: 'Arial','sans-serif'; FONT-SIZE: 10pt">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: #1f497d" lang=EN-US><o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN style="COLOR: black" lang=EN-US> </SPAN><SPAN
style="COLOR: #1f497d" lang=EN-US><o:p></o:p></SPAN></P>
<DIV>
<DIV
style="BORDER-BOTTOM: medium none; BORDER-LEFT: medium none; PADDING-BOTTOM: 0cm; PADDING-LEFT: 0cm; PADDING-RIGHT: 0cm; BORDER-TOP: #b5c4df 1pt solid; BORDER-RIGHT: medium none; PADDING-TOP: 3pt">
<P class=MsoNormal><B><SPAN
style="FONT-FAMILY: 'Tahoma','sans-serif'; COLOR: black; FONT-SIZE: 10pt"
lang=EN-US>From:</SPAN></B><SPAN
style="FONT-FAMILY: 'Tahoma','sans-serif'; COLOR: black; FONT-SIZE: 10pt"
lang=EN-US> <A
href="mailto:delphi-bounces@listserver.123.net.nz">delphi-bounces@listserver.123.net.nz</A>
[<A
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="COLOR: #1f497d; FONT-SIZE: 12pt">I’ve hit a
snag.<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN style="COLOR: black" lang=EN-US> </SPAN><SPAN
style="COLOR: #1f497d; FONT-SIZE: 12pt"><o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN style="COLOR: #1f497d; FONT-SIZE: 12pt">D7 defines
IShellLinkW like this.<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN style="COLOR: black" lang=EN-US> </SPAN><SPAN
style="COLOR: #1f497d; FONT-SIZE: 12pt"><o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN
style="FONT-FAMILY: 'Arial','sans-serif'; COLOR: black; FONT-SIZE: 10pt">
IShellLinkW = interface(IUnknown) { sl }<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN
style="FONT-FAMILY: 'Arial','sans-serif'; COLOR: black; FONT-SIZE: 10pt">
[SID_IShellLinkW]<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN
style="FONT-FAMILY: 'Arial','sans-serif'; COLOR: black; FONT-SIZE: 10pt">
function GetPath(pszFile: PWideChar; cchMaxPath: Integer;<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN
style="FONT-FAMILY: 'Arial','sans-serif'; COLOR: black; FONT-SIZE: 10pt">
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="COLOR: #1f497d; FONT-SIZE: 12pt"><o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN style="COLOR: #1f497d; FONT-SIZE: 12pt">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="COLOR: #1f497d; FONT-SIZE: 12pt"><o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN
style="COLOR: #1f497d; FONT-SIZE: 12pt">Ross.<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN style="COLOR: black" lang=EN-US> </SPAN><SPAN
style="COLOR: #1f497d; FONT-SIZE: 12pt"><o:p></o:p></SPAN></P>
<DIV>
<DIV
style="BORDER-BOTTOM: medium none; BORDER-LEFT: medium none; PADDING-BOTTOM: 0cm; PADDING-LEFT: 0cm; PADDING-RIGHT: 0cm; BORDER-TOP: #b5c4df 1pt solid; BORDER-RIGHT: medium none; PADDING-TOP: 3pt">
<P class=MsoNormal><B><SPAN
style="FONT-FAMILY: 'Tahoma','sans-serif'; COLOR: black; FONT-SIZE: 10pt"
lang=EN-US>From:</SPAN></B><SPAN
style="FONT-FAMILY: 'Tahoma','sans-serif'; COLOR: black; FONT-SIZE: 10pt"
lang=EN-US> <A
href="mailto:delphi-bounces@listserver.123.net.nz">delphi-bounces@listserver.123.net.nz</A>
<A
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="COLOR: #1f497d; FONT-SIZE: 12pt">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="COLOR: #1f497d; FONT-SIZE: 12pt"><o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN style="COLOR: #1f497d; FONT-SIZE: 12pt">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="COLOR: #1f497d; FONT-SIZE: 12pt"><o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN style="COLOR: #1f497d; FONT-SIZE: 12pt">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="COLOR: #1f497d; FONT-SIZE: 12pt"><o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN
style="COLOR: #1f497d; FONT-SIZE: 12pt">Cheers,<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN
style="COLOR: #1f497d; FONT-SIZE: 12pt">Ross.<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN style="COLOR: black" lang=EN-US> </SPAN><SPAN
style="COLOR: #1f497d; FONT-SIZE: 12pt"><o:p></o:p></SPAN></P>
<DIV>
<DIV
style="BORDER-BOTTOM: medium none; BORDER-LEFT: medium none; PADDING-BOTTOM: 0cm; PADDING-LEFT: 0cm; PADDING-RIGHT: 0cm; BORDER-TOP: #b5c4df 1pt solid; BORDER-RIGHT: medium none; PADDING-TOP: 3pt">
<P class=MsoNormal><B><SPAN
style="FONT-FAMILY: 'Tahoma','sans-serif'; COLOR: black; FONT-SIZE: 10pt"
lang=EN-US>From:</SPAN></B><SPAN
style="FONT-FAMILY: 'Tahoma','sans-serif'; COLOR: black; FONT-SIZE: 10pt"
lang=EN-US> <A
href="mailto:delphi-bounces@listserver.123.net.nz">delphi-bounces@listserver.123.net.nz</A>
[<A
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: #1f497d" lang=EN-US>The buffer has to be
</SPAN><SPAN style="COLOR: #1f497d">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: #1f497d"><o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN style="COLOR: #1f497d">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
href="http://www.axolot.com/TNT/">http://www.axolot.com/TNT/</A> - it got bought
out by TMS software: <A
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: #1f497d" lang=EN-US><o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN style="COLOR: black" lang=EN-US> </SPAN><SPAN
style="COLOR: #1f497d" lang=EN-US><o:p></o:p></SPAN></P>
<DIV>
<P class=MsoNormal><SPAN
style="FONT-FAMILY: 'Arial','sans-serif'; COLOR: navy; FONT-SIZE: 10pt"
lang=EN-US><BR></SPAN><SPAN
style="FONT-FAMILY: 'Arial','sans-serif'; COLOR: black; FONT-SIZE: 10pt"
lang=EN-US>Kind Regards,<BR>Stefan Mueller</SPAN><SPAN
style="FONT-FAMILY: 'Arial','sans-serif'; COLOR: #585757; FONT-SIZE: 10pt"
lang=EN-US> <BR></SPAN><SPAN
style="FONT-FAMILY: 'Arial','sans-serif'; COLOR: #666699; FONT-SIZE: 10pt"
lang=EN-US>_______________________<BR>R&D Manager<BR>ORCL Toolbox LLP,
Japan<BR></SPAN><SPAN style="COLOR: #1f497d" lang=EN-US><A
title=blocked::http://www.orcl-toolbox.com/
href="http://www.orcl-toolbox.com/"><SPAN
style="FONT-FAMILY: 'Arial','sans-serif'; FONT-SIZE: 10pt">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: #1f497d" lang=EN-US><o:p></o:p></SPAN></P></DIV>
<P class=MsoNormal><SPAN style="COLOR: black" lang=EN-US> </SPAN><SPAN
style="COLOR: #1f497d" lang=EN-US><o:p></o:p></SPAN></P>
<DIV>
<DIV
style="BORDER-BOTTOM: medium none; BORDER-LEFT: medium none; PADDING-BOTTOM: 0cm; PADDING-LEFT: 0cm; PADDING-RIGHT: 0cm; BORDER-TOP: #b5c4df 1pt solid; BORDER-RIGHT: medium none; PADDING-TOP: 3pt">
<P class=MsoNormal><B><SPAN
style="FONT-FAMILY: 'Tahoma','sans-serif'; COLOR: black; FONT-SIZE: 10pt"
lang=EN-US>From:</SPAN></B><SPAN
style="FONT-FAMILY: 'Tahoma','sans-serif'; COLOR: black; FONT-SIZE: 10pt"
lang=EN-US> <A
href="mailto:delphi-bounces@listserver.123.net.nz">delphi-bounces@listserver.123.net.nz</A>
[<A
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="COLOR: #1f497d; FONT-SIZE: 12pt">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="COLOR: #1f497d; FONT-SIZE: 12pt"><o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN style="COLOR: #1f497d; FONT-SIZE: 12pt">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="COLOR: #1f497d; FONT-SIZE: 12pt"><o:p></o:p></SPAN></P>
<P class=MsoNormal><B><SPAN
style="FONT-FAMILY: 'Arial','sans-serif'; COLOR: black; FONT-SIZE: 9pt">function
ResolveShortcut(const LinkPath: WideString):
WideString;<o:p></o:p></SPAN></B></P>
<P class=MsoNormal><B><SPAN
style="FONT-FAMILY: 'Arial','sans-serif'; COLOR: black; FONT-SIZE: 9pt">var<o:p></o:p></SPAN></B></P>
<P class=MsoNormal><B><SPAN
style="FONT-FAMILY: 'Arial','sans-serif'; COLOR: black; FONT-SIZE: 9pt">ShellLink:
IShellLinkW<o:p></o:p></SPAN></B></P>
<P class=MsoNormal><B><SPAN
style="FONT-FAMILY: 'Arial','sans-serif'; COLOR: black; FONT-SIZE: 9pt">
FindData: TWin32FindDataW;<o:p></o:p></SPAN></B></P>
<P class=MsoNormal><B><SPAN
style="FONT-FAMILY: 'Arial','sans-serif'; COLOR: black; FONT-SIZE: 9pt">
buff: Array [0..Max_Path-1] of Char;<o:p></o:p></SPAN></B></P>
<P class=MsoNormal><B><SPAN
style="FONT-FAMILY: 'Arial','sans-serif'; COLOR: black; FONT-SIZE: 9pt">begin<o:p></o:p></SPAN></B></P>
<P class=MsoNormal><B><SPAN
style="FONT-FAMILY: 'Arial','sans-serif'; COLOR: black; FONT-SIZE: 9pt">
ShellLink := CreateComObject(CLSID_ShellLink) as
IShellLinkW;<o:p></o:p></SPAN></B></P>
<P class=MsoNormal><B><SPAN
style="FONT-FAMILY: 'Arial','sans-serif'; COLOR: black; FONT-SIZE: 9pt">PersistFile
:= ShellLink as IPersistFile;<o:p></o:p></SPAN></B></P>
<P class=MsoNormal><B><SPAN
style="FONT-FAMILY: 'Arial','sans-serif'; COLOR: black; FONT-SIZE: 9pt">
if (PersistFile.Load(PWideChar(LinkPath),STGM_READ) = S_OK)
and<o:p></o:p></SPAN></B></P>
<P class=MsoNormal><B><SPAN
style="FONT-FAMILY: 'Arial','sans-serif'; COLOR: black; FONT-SIZE: 9pt">
(ShellLink.Resolve(Application.Handle, SLR_NO_UI) = NOERROR)
and<o:p></o:p></SPAN></B></P>
<P class=MsoNormal><B><SPAN
style="FONT-FAMILY: 'Arial','sans-serif'; COLOR: black; FONT-SIZE: 9pt">
(ShellLink.GetPath(buff,MAX_PATH,FindData,SLGP_UNCPRIORITY)= NOERROR)
then<o:p></o:p></SPAN></B></P>
<P class=MsoNormal><B><SPAN
style="FONT-FAMILY: 'Arial','sans-serif'; COLOR: black; FONT-SIZE: 9pt">
Result := buff<o:p></o:p></SPAN></B></P>
<P class=MsoNormal><B><SPAN
style="FONT-FAMILY: 'Arial','sans-serif'; COLOR: black; FONT-SIZE: 9pt">
else Result := ''<o:p></o:p></SPAN></B></P>
<P class=MsoNormal><B><SPAN
style="FONT-FAMILY: 'Arial','sans-serif'; COLOR: black; FONT-SIZE: 9pt">end;<o:p></o:p></SPAN></B></P>
<P class=MsoNormal><SPAN style="COLOR: black" lang=EN-US> </SPAN><SPAN
style="COLOR: #1f497d; FONT-SIZE: 12pt"><o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN style="COLOR: #1f497d; FONT-SIZE: 12pt">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="COLOR: #1f497d; FONT-SIZE: 12pt"><o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN style="COLOR: #1f497d; FONT-SIZE: 12pt">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="COLOR: #1f497d; FONT-SIZE: 12pt"><o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN
style="COLOR: #1f497d; FONT-SIZE: 12pt">Thanks,<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN
style="COLOR: #1f497d; FONT-SIZE: 12pt">Ross.<o:p></o:p></SPAN></P>
<DIV style="TEXT-ALIGN: center" class=MsoNormal align=center><SPAN
style="COLOR: black; FONT-SIZE: 12pt" lang=EN-US>
<HR align=center SIZE=3 width="100%">
</SPAN></DIV>
<P class=MsoNormal><SPAN style="COLOR: black; FONT-SIZE: 12pt"
lang=EN-US>_______________________________________________<BR>NZ Borland
Developers Group - Delphi mailing list<BR>Post: <A
href="mailto:delphi@listserver.123.net.nz">delphi@listserver.123.net.nz</A><BR>Admin:
<A
href="http://delphi.org.nz/mailman/listinfo/delphi">http://delphi.org.nz/mailman/listinfo/delphi</A><BR>Unsubscribe:
send an email to <A
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>
<P>
<HR>
_______________________________________________<BR>NZ Borland Developers Group -
Delphi mailing list<BR>Post: delphi@listserver.123.net.nz<BR>Admin:
http://delphi.org.nz/mailman/listinfo/delphi<BR>Unsubscribe: send an email to
delphi-request@listserver.123.net.nz with Subject:
unsubscribe</DIV></DIV></DIV></BODY></HTML>