Log On
Embarcadero Home
Watch, Follow, &
Connect with Us
Share This
QualityCentral
Communities
Articles
Blogs
Resources
Downloads
Help
QualityCentral
Delphi-BCB
RTL
Delphi
Arithmetic
ConvUtils
Date - Time
DateUtils
File Management
Format + Float
Input/Output
Math Unit
Memory, Pointer, Address
Null-terminated strings
Other Classes
Other RTL
Pascal Strings
Regular Expressions
RTL Exceptions
Text Files
Thread support
Typed/Untyped Files
WinAPI
You are not logged in.
Help
Print
Public Report
Report From:
Delphi-BCB/RTL/Delphi/Format + Float
[ Add a report in this area ]
Report #:
67295
Status:
Closed
FloatToStrF doesnt show euro sign with ffCurrency
Project:
Delphi
Build #:
3170.16989
Version:
12.0
Submitted By:
Wouter de Jong
Report Type:
Basic functionality failure
Date Reported:
9/29/2008 4:28:42 AM
Severity:
Serious / Highly visible problem
Last Updated:
3/20/2012 2:24:39 AM
Platform:
32 Bit
Internal Tracking #:
265546
Resolution:
Duplicate
(Resolution Comments)
Resolved in Build:
:
12.0.3210.17555
Duplicate of:
None
Voting and Rating
Overall Rating:
No Ratings Yet
0.00 out of 5
Total Votes:
7
Description
When using FloatToStrF te euro character is not shown in the resulting string instead an other >128 character is shown.
In D2007 everything worked fine (UNICODE problem?!)
I'm using a dutch language version of Vista with default currency settings.
Steps to Reproduce:
var
s : string;
begin
s := FloatToStrF(124.24,ffCurrency,15,2);
ShowMessage(s);
end;
Doesn't produce € 124,24 as in D2007 but produces ¬ 124,24 instead.
Workarounds
None
Attachment
None
Comments
Tomohiro Takahashi at 9/29/2008 5:33:34 AM
-
Same problem occurs with Japanese environment, too.
Jani Jarvinen at 9/29/2008 11:11:52 PM
-
This problem seems to affect all locales that use a currency symbol which require more than one byte to store the character.
The problem appears to be in the assembly language routine SysUtils.FloatToText. In this routine, there's a label called @@PutCurSym, marking the spot in which the currency symbol is added to the string. But, the instruction REP MOVSB is used there, which only moves one byte at a time.
For example with the Euro sign, this function results in bytes $AC,$00 appended to the string, which results in the errorneous Not Sign (U+00AC) being inserted.
The correct Unicode character for Euro should be U+20AC, or bytes $AC,$20. Maybe changing the assembly code line to REP MOVSW would correct this?
Also, this same problem affects the CurrToStrF function.
Tomohiro Takahashi at 3/9/2009 6:54:05 PM
-
Hi,
With 12.0.3210.17555, does this problem still occur?
Wouter de Jong at 3/11/2009 1:04:07 AM
-
I've just tested it with CodeGear Delphi® 2009 Version 12.0.3210.17555 and it seems to work just fine now.
Tomohiro Takahashi at 3/11/2009 6:47:21 PM
-
Thanks for confirmation.
I think this report should be closed.
View Your Reports
Search
Server Response from: ETNACODE01
Developer Tools
Blackfish SQL
C++Builder
Delphi
FireMonkey
Prism
InterBase
JBuilder
J Optimizer
HTML5 Builder
3rdRail & TurboRuby
Database Tools
Change Manager
DBArtisan
DB Optimizer
ER/Studio
Performance Center
Rapid SQL
Technical Articles
Tutorials
White Papers
Press Releases
Newsletters
Add Content (GetPublished)
Audio
Audio & Video
Video
Bugs & Suggestions (QualityCentral)
Discussion Forums
Examples (CodeCentral)
Tags
Technology Partners
Downloads
Free Trials
Registered User Downloads
Beta Programs
Add Content (GetPublished)
Articles
Blogs
Bugs & Suggestions (QualityCentral)
Discussion Forums
Examples (CodeCentral)
Member Services
About
Connect with Us