eol

size difference between email and ftp text message - EOL characters?

I'm attempting to deliver the same message whether its over FTP or email, but the saved file keeps coming out as different sizes. The textual content of the message is the same, but the nonprintable characters must be accounting for the different size! When transferring the text file over FTP (in Binary mode to prevent FTP translation o...

determining the line terminator in emacs

I'm writing a config file and I need to define if the process expects a windows format file or a unix format file. I've got a copy of the expected file - is there a way I can check if it uses \n or \r\n without exiting emacs? ...

c++ ifstream, detect if letter or EOLine?

I have this function to read in all ints from the file. The problem is when i read letters i trigger a new line and i always seek by 1 and not to the end of line. How can i write this function better? int v; while (!in.eof()) { while (in >> v) cout << v << " "; cout << endl; if (in.eof()) break; ...

Setting encoding, newline, linebreaks, end-of-line (EOL) in PHP

For example, when I create a new file: $message = "Hello!"; $fh = fopen(index.html, 'w'); fwrite($fh, $message); fclose($fh); How can I set it's encoding(utf-8 or shift-jis or euc-jp) and linebreaks(LF or CR+LF or CR) in PHP? ...

Can git-svn be made to handle CRLF like native subversion clients?

I have a subversion repository hosted on Linux but only ever accessed via windows clients as it's for the source of a large Windows application. It would be awesome if I could work on this repository using git-svn (provided by msysgit). I'm having a heck of a time trying to get the repository to not get itself in a jam over the windows...

Java source upgrade from 1.4.2 to 1.6.0_10 recommended ? (skipping 1.5)

Our desktop-only product at work has been using JDK 1.4.2 until now (also 1.4.2 JRE shipped with product). I am trying to convince the management to let us upgrade to a newer version in order to get the performance, API/features and developer comfort benefits. Since 1.5 has reached EOL transition, I'm I thinking of the upgrade to 1.6.0...

in Vim how do I hide the eol doc chars ^M

in gvim on windows if I have text with CRLF eol then the text will display ^M at the end of each line. How do I 'hide' that special char from display? the :set nolist command """ does not dismiss it. I am stumped. UPDATE I did :set fileformats=unix,dos as a list but it didn't work at first. I closed the file and reopened it agai...

Using boost::spirit, how do I require part of a record to be on its own line?

I have a record parser that throws one of several exceptions to indicate which rule failed. Front matter: #include <iostream> #include <sstream> #include <stdexcept> #include <string> #include <boost/spirit/include/qi.hpp> #include <boost/spirit/include/phoenix.hpp> #include <boost/spirit/include/classic_position_iterator.hpp> using ...

How do I parse end-of-line with boost::spirit::qi?

Shouldn't a simple eol do the trick? #include <algorithm> #include <boost/spirit/include/qi.hpp> #include <iostream> #include <string> using boost::spirit::ascii::space; using boost::spirit::lit; using boost::spirit::qi::eol; using boost::spirit::qi::phrase_parse; struct fix : std::unary_function<char, void> { fix(std::string &result...

vim: wrap question

I would like to wrap the text 5 characters before the end of window (without breaking the line). I don't know how to do this without putting an EOL character in the text (wrapmargin/textwidth). ...

vim: showing listchars changes the screen wrapping

I noted that when I show up the EOL listchars in a text the linebreaks are losen p.e. this is my text of this message becomes after set list ..eol this is my text of this mess age(EOL CHAR) I would like to see the EOL characters without breaking the words at window border. Is that possible? ...

C++ portable end of line

Hi everyone, is there any way to automatically use correct EOL character depending on the OS used? I was thinking of something like std::eol? I know that it is very easy to use preprocessor directives but curious if that is already available. EDIT What I am interested in is that I usually have some messages in my applications that I...

CVS to Mercurial conversion: end of line problem

I recently converted a CVS repository to Mercurial. From the looks of it, everything went perfect. Except that every end-of-line character is in Unix style and I want them in Windows style. I know the hg convert command can be used to "convert" a Mercurial repository to a Mercurial repository. Can I use it to do nothing on the repos but...

NSString: EOL and rangeOfString issues

Could someone please tell me if I am missing something here... I am trying to parse individual JSON objects out of a data stream. The data stream is buffered in a regular NSString, and the individual JSON objects are delineated by a EOL marker. if([dataBuffer rangeOfString:@"\n"].location != NSNotFound) { NSString *tmp = [dataBuffer ...

How the change the line ending used in Netbeans

Netbeans has this wiki entry on line endings: http://wiki.netbeans.org/FaqEditorEOLs But it isn't very useful. It just says that you shouldn't develop on different OS and that's that... In my situation however, I have no power over it. I'm on a windows machine and the PHP app I'm working on needs to end with the UNIX EOL. There does n...

SQL Server BCP only one row inserted?

I'm using an FMT file to BCP a csv file into a an SQL Server Box - everything is fine, but only the first row of the 5 line file is getting inserted. I think it is the line feed settings for the terminator of the final column - but how do I view and edit the line feeds in the csv file? ...

What is the official eol value that's sent by browsers (in textarea, for example)

In PHP "\n" acts as the eol for the OS you're on so that's unreliable. Also, I understand that PHP has constants for EOL, that's not really what I'm asking, I want to know what EOL value I can reliably check for from browsers. ...

Problems configuring eol extension in Mercurial

Hi. I'm trying to clone a unix-hosted Mercurial repository to a Windows computer. I'm hoping to use the eol extension so that my text files with LF endings on the server have CRLF when cloned to a Windows computer. Previously I've used the win32text extension which has worked fine, but since the general consensus seems to be that the e...

Cross platform development using Git (EOL issue)

Hi, In our development environment we use Windows, Mac, and Linux. I am having trouble when it comes to the commit -> pull -> push work flow. The problem is end of line characters. If someone makes an edit on Mac and some one else makes an edit on Windows they conflict when pulling. The diff shows the entire file as different because t...

Python file.write creating extra carriage return

I'm writing a series of SQL statements to a file using python. The template string looks like: store_insert = '\tinsert stores (storenum, ...) values (\'%s\', ...)' I'm writing to the file like so: for line in source: line = line.rstrip() fields = line.split('\t') script.write(store_insert % tuple(fields)) script.writ...