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

Outputting Text in Unix Format

Hello!

Is there a way to output text in a unix format from vb.net? I am trying to complete a CIM load in Progress and I need the data to be in unix format.

I tried using the following code but it left me with a line carriage return in the file (0d0a)

outfilew.Write(group6)
outfilew.Write(Environment.NewLine)

Note:
From http://www.developmentnow.com/g/38_2...nguages-vb.htm

Posted via DevelopmentNow.com Groups
http://www.developmentnow.com
Nov 21 '05 #1
5 4465
Lyle,

What is it that you call Unixformat, are you talking about a local code
page, Unix is not only used on the Northpole so it holds as well many types
of code a character.

http://www.geocities.com/Athens/Acad.../fontset.htm#b

Or are you talking about 127bits ASCII what is quiet uniform beside EBCDIC
however the last is as far as I know never used on Unix.

Give us some more information.

Cor
Nov 21 '05 #2

well isn`t it so that

Windows uses cariage return and linefeed VB contstant VBCRLF and Unix
uses only cariage return vb contstant VBCR as a newline char ??

hth

M. posseth
"Lyle A. Sieren" <no****@developmentnow.com> schreef in bericht
news:f3**********************************@msnews.m icrosoft.com...
Hello!

Is there a way to output text in a unix format from vb.net? I am trying
to complete a CIM load in Progress and I need the data to be in unix
format.

I tried using the following code but it left me with a line carriage
return in the file (0d0a)

outfilew.Write(group6)
outfilew.Write(Environment.NewLine)

Note:
From
http://www.developmentnow.com/g/38_2...nguages-vb.htm

Posted via DevelopmentNow.com Groups
http://www.developmentnow.com

Nov 21 '05 #3
"Lyle A. Sieren" <no****@developmentnow.com> wrote in message
news:f3**********************************@msnews.m icrosoft.com...
I tried using the following code but it left me with a line carriage return in the file (0d0a)

outfilew.Write(group6)
outfilew.Write(Environment.NewLine)


If this is run on a Windows box, it will use vbCrLf (0d0a) for a line
break. Unix only wants vbLf (0a). Change your code to

outfilew.Write(group6)
outfilew.Write(vbLf)

(or, better still)

outfilew.Write(group6 & vbLf)

HTH,
Phill W.
Nov 21 '05 #4

i was already thinking was it now only the cariage return or the linefeed
??? :-) just checked some verry old source ( VB 5 / 6 ) and yes Phil you
beated me before i could correct it

well it is so long ago that i had to write files to the system for
exchanging data with third party software

and yes we did write those files to Linux \ Unix file shares and they worked
perfectly ( without any strange conversions or what so ever )
by the way Phil W is that 'the' Phil Weber from the good old days on
freevbcode.com and now Devx ? , if so nice to see you again on the web
Phil

regards

Michel Posseth

"Phill. W" <P.A.Ward@o-p-e-n-.-a-c-.-u-k> wrote in message
news:dg**********@yarrow.open.ac.uk...
"Lyle A. Sieren" <no****@developmentnow.com> wrote in message
news:f3**********************************@msnews.m icrosoft.com...
I tried using the following code but it left me with a line carriage

return
in the file (0d0a)

outfilew.Write(group6)
outfilew.Write(Environment.NewLine)


If this is run on a Windows box, it will use vbCrLf (0d0a) for a line
break. Unix only wants vbLf (0a). Change your code to

outfilew.Write(group6)
outfilew.Write(vbLf)

(or, better still)

outfilew.Write(group6 & vbLf)

HTH,
Phill W.

Nov 21 '05 #5
THANKS everyone! I used the following code suggested by Phil and it worked perfectly!
outfilew.Write(group6 & vbLf)
From http://www.developmentnow.com/g/38_2...nix-Format.htm

Posted via DevelopmentNow.com Groups
http://www.developmentnow.com
Nov 21 '05 #6

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

Similar topics

5
by: Andrei Pociu | last post by:
I have a major doubt about outputting text in ASP .NET when using code behind. I know most of the output you gain from a code behind file (.aspx.cs) is outputted to the Webform (.aspx) using...
5
by: Ash Phillips | last post by:
Ok, I'm not sure how I can explain this but here goes. I have this program that uses a ListView for entries. What I have the program doing is taking all the items from the listview, and writing...
2
by: Lyle A. Sieren | last post by:
Hello! Sorry...I accidentally posted the last message before finishing it. How do you write a file in unix format from vb.net? I need it in unix format to complete a CIM load in Progress. I...
1
by: igotyourdotnet | last post by:
I need to create a text file which I can get working but i need it to be in this format which I'm close but not exactly there yet. format I need: 1234569 BMW 1253252Mercedes 9876522 ...
4
by: PengYu.UT | last post by:
Suppose I have a dos format text file. The following python code will print ^M at the end. I'm wondering how to print it in unix format. fh = open(options.filename) for line in fh.readlines()...
1
by: TimmyNZER | last post by:
Hi, I'm trying to set the format of a "text box" to accept text, I have tried setting the format in the property sheet, but there are only numerical options. I'm sure it must be pretty simple, but...
2
by: Sarahger9 | last post by:
Hi, I am writing a code that requires me to search for words within a text document. I had to build up words one character at a time in order to ignore punctuation when I search for the words. I...
0
by: =?Utf-8?B?QXNoaXNoIFNheGVuYQ==?= | last post by:
How to change text box format from text to date format or currency format. I tried from property window but same was not change. I want that if I write in text box 1000 and press tab then format...
1
by: =?Utf-8?B?UmljaA==?= | last post by:
In the Registry at HKEY_LOCAL_MACHINE \ SOFTWARE \ Microsoft \ Jet \ 4.0 \ Engines \ Text the default key for Text Format is: "Format" = "CSVDelimited" I can use the following OleDB...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
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: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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?

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.