Re: Delphi 2009 - CG tip everything on ( only ) Unicode ?
- From: "Thorsten Engler [NexusDB]" <thorsten.engler@xxxxxxxxxxx>
- Date: 21 Jul 2008 07:10:33 -0700
Francisco Ruiz wrote:
unicode based code will be faster than ansi based?
The Unicode versions of the Win32 API calls are faster then the ANSI
versions of the same API calls because on all NT based systems the ANSI
versions are implemented as a wrapper around the Unicode version which
performs an ANSI -> Unicode -> ANSI conversion for all string values
going in and out.
The Unicode versions are the native API of NT based Windows, the ANSI
versions just have been preserved to keep binary compatibility for
applications that are written to run on Win9x (where the "native" API
was the ANSI one and most of the Unicode API is not even implemented).
Beyond all the differences there is also the fundamental problem of
using the ANSI APIs to access files. NTFS is fully unicode enabled, so
file and folder names are in Unicode. It's perfectly possible that
someone installed your application in a folder which contains
characters that can not be represented in the current ANSI codepages.
Or that a user selects a file in a file open dialog which contains
characters in folder or filename which can not be represented in the
current ANSI codepage. If you are using the ANSI APIs you will not be
able to access these files or folders.
--
.
- Follow-Ups:
- References:
- Delphi 2009 - CG tip everything on ( only ) Unicode ?
- From: Enrico Ghezzi
- Re: Delphi 2009 - CG tip everything on ( only ) Unicode ?
- From: marc hoffman
- Re: Delphi 2009 - CG tip everything on ( only ) Unicode ?
- From: Jens Mühlenhoff
- Re: Delphi 2009 - CG tip everything on ( only ) Unicode ?
- From: Jim Fleming
- Re: Delphi 2009 - CG tip everything on ( only ) Unicode ?
- From: Jens Mühlenhoff
- Re: Delphi 2009 - CG tip everything on ( only ) Unicode ?
- From: Thorsten Engler [NexusDB]
- Re: Delphi 2009 - CG tip everything on ( only ) Unicode ?
- From: Francisco Ruiz
- Delphi 2009 - CG tip everything on ( only ) Unicode ?
- Prev by Date: Re: Delphi 2009 - CG tip everything on ( only ) Unicode ?
- Next by Date: Re: Delphi 2009 - CG tip everything on ( only ) Unicode ?
- Previous by thread: Re: Delphi 2009 - CG tip everything on ( only ) Unicode ?
- Next by thread: Re: Delphi 2009 - CG tip everything on ( only ) Unicode ?
- Index(es):
Relevant Pages
|
Loading