WriteLine not culture sensitive

  • Thread starter Thread starter Jack Russell
  • Start date Start date
J

Jack Russell

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
 
Jack,

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

Cor
 
Cor said:
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
 
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
 
Jack Russell said:
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.
 
Cor said:
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
 
Herfried said:
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top