[DUG] Translate diacritic characters to ASCII
Ross Levis
ross at stationplaylist.com
Tue Feb 26 18:49:48 NZDT 2013
That works, thanks.
From: delphi-bounces at listserver.123.net.nz [mailto:delphi-bounces at listserver.123.net.nz] On Behalf Of Stefan Mueller
Sent: Tuesday, 26 February 2013 6:30 p.m.
To: 'NZ Borland Developers Group - Delphi List'
Subject: Re: [DUG] Translate diacritic characters to ASCII
Just convert it to US-ASCII, all diacritics will be normalized (and other characters like japanese will turn to “?”).
procedure TFrameScript.BitBtn1Click(Sender: TObject);
var sw : string;
sr : RawByteString;
begin
sw := 'swe:ÀÁÂÃÄÅ - jap:日本 - ger:üöä';
sr := sw;
SetCodePage(sr, 20127, true);
BitBtn1.caption := sr;
end;
Kind Regards,
Stefan Mueller
_______________________
R&D Manager
ORCL Toolbox LLP, Japan
<http://www.orcl-toolbox.com/> http://www.orcl-toolbox.com
From: delphi-bounces at listserver.123.net.nz [mailto:delphi-bounces at listserver.123.net.nz] On Behalf Of Ross Levis
Sent: Tuesday, February 26, 2013 1:29 PM
To: 'NZ Borland Developers Group - Delphi List'
Subject: [DUG] Translate diacritic characters to ASCII
Anyone know if there is a windows function or method to convert diacritic characters to their similar ASCII counterpart, such as all of these get translated to “A”: ÀÁÂÃÄÅ
Cheers.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://listserver.123.net.nz/pipermail/delphi/attachments/20130226/3d76df79/attachment.html
More information about the Delphi
mailing list