Welcome to Telelogic Product Support
  Home Downloads Knowledgebase Case Tracking Licensing Help Telelogic Passport
Telelogic DOORS (steve huntington)
Decrease font size
Increase font size
Topic Title: problem with writing charOf(10) to a stream
Topic Summary:
Created On: 3-Apr-2008 11:20
Status: Post and Reply
Linear : Threading : Single : Branch
Search Topic Search Topic
Topic Tools Topic Tools
Quick Reply Quick Reply
Subscribe to this topic Subscribe to this topic
E-mail this topic to someone. E-mail this topic
Bookmark this topic Bookmark this topic
View similar topics View similar topics
View topic in raw text format. Print this topic.
Answer This question was answered by Pekka Mäkinen, on Friday, April 4, 2008 8:45 AM

Answer:
Without knowing about your application: one way to go round this it to open the stream write as binary, then there will be no character translations by DOORS.

E.g. Stream out = write binary "c:\\local\\test.txt"
 3-Apr-2008 11:20
User is offline View Users Profile Print this message


Sjors de Leeuw

Posts: 23
Joined: 18-Apr-2007

Hi

I open a stream for writing, and write a string including ascii character 10 (hex 0xA) to it.
For some reason, character 0xA is preceded with 0xD. So not only the new line character, but also the carriage return character is written to the file.

When writing other characters (e.g. 0xB), only that character is written to the file, so the behaviour is correct then.

Why?!? Is there a workaround to avoid this unwanted behaviour?

Thanks!
Sjors

Reproduce with

Edited: 3-Apr-2008 at 11:25 by Sjors de Leeuw
Report this to a Moderator Report this to a Moderator
 3-Apr-2008 12:45
User is offline View Users Profile Print this message


Pekka Mäkinen

Posts: 276
Joined: 18-Mar-2004

Answer Answer
Without knowing about your application: one way to go round this it to open the stream write as binary, then there will be no character translations by DOORS.

E.g. Stream out = write binary "c:\\local\\test.txt"

-------------------------
Pekka.Makinen@softqa.fi
SoftQA Oy -http://www.softqa.fi/
Report this to a Moderator Report this to a Moderator
 4-Apr-2008 08:46
User is offline View Users Profile Print this message


Sjors de Leeuw

Posts: 23
Joined: 18-Apr-2007

Peka, thanks for the valuable hint. This works.
Report this to a Moderator Report this to a Moderator
Statistics
20925 users are registered to the Telelogic DOORS forum.
There are currently 1 users logged in.
The most users ever online was 15 on 15-Jan-2009 at 16:36.
There are currently 0 guests browsing this forum, which makes a total of 1 users using this forum.
You have posted 0 messages to this forum. 0 overall.

FuseTalk Standard Edition v3.2 - © 1999-2009 FuseTalk Inc. All rights reserved.