473,441 Members | 1,853 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,441 software developers and data experts.

WriteLine not culture sensitive

WriteLine always seems to use commas as separators regardless of the
current culture. If this is true is there an alternative which is
culture sensitive or do I have to do it the long way?

Thanks

Jack Russell
Nov 23 '05 #1
6 1451
Jack,

WriteLine writes a line from a String that contains Unicode characters. It
does not look what those are.

Cor
Nov 23 '05 #2
Cor Ligthert [MVP] wrote:
Jack,

WriteLine writes a line from a String that contains Unicode characters. It
does not look what those are.

Cor

Cor,

If I specify more than one item it inserts commas between them. That is
my problem , the commas are not culture sensitive.
So
s1="1"
s2="2"
writeline (#1,s1,s2)

produces
1,2
regardless of the culture.

I can easily program around this but I am trying to toe the ".net" line
and hoped there would be a way of doing it.

Jack
Nov 23 '05 #3
Jack,

A csv is not a standard.

It was AFAIK in very classic basic not in VB.Net.

Why don't you try a XML file for that, by instance a dataset/datatable.

Cor
Nov 23 '05 #4
"Jack Russell" <ja***@norubbish.tpg.com.au> schrieb:
If I specify more than one item it inserts commas between them. That is my
problem , the commas are not culture sensitive.
So
s1="1"
s2="2"
writeline (#1,s1,s2)

produces
1,2
regardless of the culture.


Are you using VB.NET's 'WriteLine' file access command? Your observation of
'WriteLine' being not culture-sensitive is true. 'WriteLine' writes data in
a culture-invariant format, which makes reading the data on different
systems easier. You may want to use 'PrintLine' if you want to write data
in a locale-aware format.

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>

Nov 23 '05 #5
Cor Ligthert [MVP] wrote:
Jack,

A csv is not a standard.

It was AFAIK in very classic basic not in VB.Net.

Why don't you try a XML file for that, by instance a dataset/datatable.

Cor

Thanks Cor, but as they say "the customer is always right" and they want
a csv type file!

Jack
Nov 23 '05 #6
Herfried K. Wagner [MVP] wrote:
"Jack Russell" <ja***@norubbish.tpg.com.au> schrieb:
If I specify more than one item it inserts commas between them. That
is my problem , the commas are not culture sensitive.
So
s1="1"
s2="2"
writeline (#1,s1,s2)

produces
1,2
regardless of the culture.

Are you using VB.NET's 'WriteLine' file access command? Your
observation of 'WriteLine' being not culture-sensitive is true.
'WriteLine' writes data in a culture-invariant format, which makes
reading the data on different systems easier. You may want to use
'PrintLine' if you want to write data in a locale-aware format.

Thanks, that is the conclusion I was coming to
Nov 23 '05 #7

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

Similar topics

32
by: Elliot Temple | last post by:
Hi I have two questions. Could someone explain to me why Python is case sensitive? I find that annoying. Also, why aren't there multiline comments? Would adding them cause a problem of some...
2
by: J. Muenchbourg | last post by:
I'm doing a few tests with simple .net scripts, and I noticed that I display the following error message at ErrMessage.Text if I don't enter "BLUE" in capital letters into my input textbox: ...
4
by: trint | last post by:
what is the best way to make a .net (english) website viewable in other languages, cultures? Thanks, Trint
5
by: Billy | last post by:
Hi! How can I override "Debug.Writeline("Message")" so that will not show that msg in Debug window, but wrote it to a file. I already have a code to write to a file but I would like to use just...
0
by: Rob Dob | last post by:
Hi, I have a VS2003 C# asp.net project that has been converted into a VS2005 project. Everything seemed to work well until I make a modification to anything within the Component Designer...
3
by: shapper | last post by:
Hello, I am working on a multilanguage Asp.Net 2.0 web site. I need to do the following: 1. Set a default culture in Web.Config File. 2. Create a function which changes culture when pressed....
0
by: Jack Robertson | last post by:
Hi there, When writing code that needs to search a string for punctuation like a "." for instance (using any typical .NET search function - read on), can I generally expect this to work in a...
10
by: John Brown | last post by:
Hi there, Does anyone know how to go about reading/writing a type to a file in a language (culture) independent way. For instance, let's say you're dealing with the native "System.Drawing.Size"...
38
by: Bart | last post by:
Why is C case sensitive? I know it's a bit late to change it now but there would seem to be far more advantages in ignoring letter case in source code. In real life such a situation would be...
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:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
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...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

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.