473,387 Members | 1,517 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

International settings

Tim
Hi there,
I have written a code to perform some data analysis.
Because of the "new and improved" international setting on
CDbl etc. I have that my users cannot use the software
outside UK-US unless they change the international setting.
The input is from UNIX like programs so they use the US
convention for numbers

This quite stupid, does anyone know a simple modification,
statement that will allow the program to be "locale
independent".
I would prefer not to make big modifications. It works
fine as it is!

Regards,

T
Nov 20 '05 #1
2 1368
"Tim" <a.****************@rl.ac.uk> schrieb
Hi there,
I have written a code to perform some data analysis.
Because of the "new and improved" international setting on
CDbl etc. I have that my users cannot use the software
outside UK-US unless they change the international setting.
The input is from UNIX like programs so they use the US
convention for numbers

This quite stupid, does anyone know a simple modification,
statement that will allow the program to be "locale
independent".
I would prefer not to make big modifications. It works
fine as it is!

Untested:
1. Create a new System.Globalization.CultureInfo object by passing a fixed
culture name (e.g. "en-EN") to the constructor.
2. Pass the CultureInfo object and the string to be parsed to Double.Parse.
The CultureInfo object implements IFormatProvider, so this is possible.
--
Armin
Nov 20 '05 #2
You can change the culture info for the curent thread - all numeric to
string conversions after that should use the culture info you chose

To change the current thread locale:
Dim lc As Globalization.CultureInfo = New
Globalization.CultureInfo("en-GB")
Threading.Thread.CurrentThread.CurrentCulture = lc
Console.WriteLine(CStr(CDec(1.1)))

Nov 20 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: seigo | last post by:
I use datetime condition in sql-query. For example: select something from sometable where date between '06/15/04 00:00:00' and '06/15/04 23:59:59' and result on two synchronized servers is...
0
by: MarionEll | last post by:
XML 2004 Shows International Side to XML Alexandria, Va. - Oct. XX, 2004 - IDEAlliance, a leading industry association dedicated to fostering XML and other information technology standards, today...
1
by: Roger | last post by:
I am currently working on an application that is being used mostly in the US but recently has been purchased by several users outside the US, mostly in South America. The application uses an...
0
by: Yeongja_Choi | last post by:
How Dare Could America Industrial Property Office Be In Conspiracy With Jungang International Patent Office To Make An Extravagant International Crime ? Currently a Korean party now holds the...
0
by: MarionEll | last post by:
XML 2004 Shows International Side to XML Alexandria, Va. - Oct. XX, 2004 - IDEAlliance, a leading industry association dedicated to fostering XML and other information technology standards, today...
4
by: Vladislav Moltchanov | last post by:
I try to use MS Access application as data entry/verification tool in a multi-centre international project, where each centre uses this application for local project management and data...
1
by: cab2 | last post by:
We currently have an application built in Access that takes in a csv file using docmd.transfertext. We allow users to export their data to a file for later use (csv format). Users are also...
6
by: MrNobody | last post by:
I'm loading some names from a file which contains many names, some of which have some international charcaters like: ΓΆ When I load these names and put them into GUI Labels or DataGrid columns...
6
by: michele | last post by:
Hi, I have a problem with two function: IsNumber() and CDbl() because when I invoke it they throw an exception. The problem I think is International Settings, because NumberDecimalSeparator and...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.