Watch, Follow, &
Connect with Us
Public Report
Report From: Delphi-BCB/RTL/Delphi/Format + Float    [ Add a report in this area ]  
Report #:  93782   Status: Closed
Delphi XE does not honour regional settings
Project:  Delphi Build #:  15.0.3953.35171
Version:    15.1 Submitted By:   Adrian Wreyford
Report Type:  Basic functionality failure Date Reported:  5/11/2011 9:16:04 AM
Severity:    Serious / Highly visible problem Last Updated: 3/20/2012 2:24:39 AM
Platform:    All platforms Internal Tracking #:   283956
Resolution: Fixed (Resolution Comments) Resolved in Build: : 16.0.4198.40891
Duplicate of:  None
Voting and Rating
Overall Rating: No Ratings Yet
0.00 out of 5
Total Votes: None
Description
Background: Win 7 Ultimate 64 Bit. Regional settings: Format: English South Africa. Currency Symbol = 'R'. Other programs installed honour these regional settings. Delphi XE Professional, however reverts to the $ for currency.

Locale: English South Africa.
I actually did attach an image of the Locale settings.
Steps to Reproduce:
Create a New VCL Forms Application. Place a Speedbutton on the form. Place a Label on the form. In the on click event of the SpeedButton place the following code: Label1.Caption := FormatSettings.CurrencyString; Compile and run the application. On my computer it should show 'R', but it shows '$' Other programs on the PC honour these settings.
Workarounds
Has this got to do with the fact that Delphi XE is 32 bit run on a 64Bit Win & ultimate? I cannot find any specific place to change this. I can override this by adding the following code: FormatSettings.CurrencyString := 'R'; to my onCreate event for the form1. This shouldn't be necessary, and the default currency settings should be honoured on the PC. I have attached the default currency settings as a nimage on the PC, and also a project I debugged, to show that it is incorrectly $. This never happened before with RAD2010, on my Win Vista Machine. If I run an application like openoffice the currency symbol correctly displays R on my Win7 Ultimate 64 bit machine. It is only Delphi XE that doesn't honour regional settings.
Attachment
CurrencySettingsOnPC.zip
Comments

Tomohiro Takahashi at 5/13/2011 7:49:50 AM -
What system locale do you use in your OS?
And, could you please attach sample project(including screenshots) to reproduce your issue?

Adrian Wreyford at 6/1/2011 12:15:26 PM -
Hello Tomohiro:
Locale: English South Africa.
I actually did attach an image of the Locale settings.

I did as you asked and added the test project that is outlined in steps.

On my PC I see a $ in the label instead of R

Tomohiro Takahashi at 6/1/2011 7:03:12 PM -
> I actually did attach an image of the Locale settings.
The image is missing in [Attachments].

> Regional settings: Format: English South Africa. Currency Symbol = 'R'.
Could you tell us more details about how you configure the setting?

In my environments(Windows 7 32bit/64bit Ultimate Japanese Edition), your sample application shows correctly any currency symbol I set.

Adrian Wreyford at 6/16/2011 8:48:03 AM -
I have once again attached the settings.

Regards

Adrian Wreyford

Tomohiro Takahashi at 6/16/2011 6:24:07 PM -
Unfortunately, with my environment, I can not reproduce your issue.
So, if you need more investigation, please contact technical support service.
http://suppor.embarcadero.com/

Richard Dufour at 6/19/2011 4:35:59 PM -
FYI,

I have the same problem. I solved it by using the suggested:
FormatSettings.xyz := ...

Ex:
FormatSettings.ShortDateFormat := 'm/d/y';

So the original post is correct. XE doesn't seem to respect regional settings.

Please don't just reply "sorry dude, cannot reproduce it" and wash your hands off it and fix the darn thing.

I see so many posts from Embarcadero that basically ends up with "sorry can't help you".



Tomohiro Takahashi at 6/19/2011 10:24:50 PM -
Hi, Richard-san
Do you have any sample project and [Steps] to confirm this issue?
If yes, could you please upload it to Discussion Forum?
[Embarcadero Discussion Forums >> Attachments]
https://forums.embarcadero.com/forum.jspa?forumID=2

Server Response from: ETNACODE01