Issue 15388 in dart: Requirement for Platform dependent newline char

17 views
Skip to first unread message

da...@googlecode.com

unread,
Nov 30, 2013, 12:08:59 PM11/30/13
to bu...@dartlang.org
Status: New
Owner: ----
Labels: Type-Defect Priority-Unassigned

New issue 15388 by lima...@gmail.com: Requirement for Platform dependent
newline char
http://code.google.com/p/dart/issues/detail?id=15388

I think we might need something like Platform.NewlineChar

What steps will reproduce the problem?
1. No. This is new feature requirement.

What is the expected output? What do you see instead?
\n generate LineFeed only in Ubuntu, but \n generate CarriageReturn +
LineFeed in Windows.

What version of the product are you using? On what operating system?
Windows, Linux

Please provide any additional information below.
This is critical. Because when we have a code writing `\n` to a file. This
code write only LifeFeed. and It is not suitable with Windows.


--
You received this message because this project is configured to send all
issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings

da...@googlecode.com

unread,
Dec 2, 2013, 5:09:14 AM12/2/13
to bu...@dartlang.org
Updates:
Status: Triaged
Labels: -Type-Defect Type-Enhancement Area-Library

Comment #1 on issue 15388 by l...@google.com: Requirement for Platform
It probably belongs somewhere in dart:io's Platform class.

da...@googlecode.com

unread,
Dec 19, 2013, 10:33:02 AM12/19/13
to bu...@dartlang.org
Updates:
Labels: -Area-Library Area-IO

Comment #2 on issue 15388 by l...@google.com: Requirement for Platform
(No comment was entered for this change.)

da...@googlecode.com

unread,
Jan 2, 2014, 8:37:49 AM1/2/14
to bu...@dartlang.org
Updates:
Status: WontFix

Comment #3 on issue 15388 by sgj...@google.com: Requirement for Platform
String literals can contain both \n and \r characters for writing line feed
(char code 10) and carriage return (char code 13).

I don't think we should have any automatic conversions of \n into \r\n on
Windows. Most Windows applications work fine with just \n these days.

It is possible to make a converter using dart:convert which does this, or
use string interpolation with a variable holding the newline sequence.

da...@googlecode.com

unread,
Jan 3, 2014, 10:25:47 PM1/3/14
to bu...@dartlang.org

Comment #4 on issue 15388 by lima...@gmail.com: Requirement for Platform
I see. Closing then.
Reply all
Reply to author
Forward
0 new messages