Re: Converting WideChar/WideString to AnsiChar/AnsiString



"ckoegl" <koegl@xxxxxxxxxxxxx> wrote in message
news:e6eb3d02-23e4-4491-a9a4-be4469f97712@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

What is the exact definition of the WideChar to AnsiChar conversion
(and in extension of the WideString to AnsiString conversion)?

That depends on the conversion you use. Windows has a built-in function
whose name escapes me at the moment; something like UnicodeToMultiByte.
It shouldn't be too hard to find. IIAMN, Delphi uses it when you assign
a WideString to an AnsiString.


I suppose that for all WideChar values that are valid AnsiChar values
(i.e. the ones with Ord-values of 0 to 255) are preserved in the
conversion, but what about the rest?

The above-mentioned Windows function replaces them with question marks.
Which is not very good, but about the best you can do short of throwing
an exception.

Groetjes,
Maarten Wiltink


.



Relevant Pages

  • How To Convert Thousands of Works 7.0 Files to Word 2007 Simultaneously
    ... to discuss automatic conversion of *ALL* files of particular types. ... Home Edition of Windows XP on a new Gateway system unit. ... templates directory. ... I've created a macro which automates the use of the Convert command in the ...
    (microsoft.public.word.docmanagement)
  • Re: How To Convert Thousands of Works 7.0 Files to Word 2007 Simultaneously
    ... Dim strFileName As String ... discuss automatic conversion of *ALL* files of particular types. ... "so-called word processor" when I wasn't able to operate Word years ... It was bundled with the Home Edition of Windows XP on ...
    (microsoft.public.word.docmanagement)
  • Re: Backward compatibility with FileMaker 6
    ... I wanted to ask if the latest version of filemaker is ... My best suggestion would be to purchase a copy of MetaData Magic and run a conversion report. ... references to old files that no longer exist, which can create long delays while opening the solution or while some scripts run which require other external FM files to open. ... The result is that you may start getting error messages when you switch windows without first committing the record in the first window. ...
    (comp.databases.filemaker)
  • Re: A 20K Executable with one VB instruction statement...
    ... file is different between different versions of Windows and ... Windows 2K only can handle quad byte conversion ... The above is just the imports. ... I'm thinking that somewhere there's a reference to OLEAUT32.DLL. ...
    (alt.lang.asm)
  • Re: Does FAT32 restrict me to max filesize of 4GB?
    ... of free space for temp files and defragging. ... the conversion will take place at the next reboot. ... Colin Barnhorst [MVP Windows - Virtual Machine] ... I can use PM to make me a new partition (I have 29 gigs ...
    (microsoft.public.windowsxp.basics)