Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Connect 2026 Agenda Now Available: Explore Sessions
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

problem with tFileOutputPositional

I'm tried to create a text file filled with data from a database using tfileOutputPositional. Job work correctly, but if i open file with Notepad his content is not formatted. How can i solve this issue? (See image below)

Notice: If I open file with MFC Wordpad e save it as "Text Document - MS-DOS format", when reopen file, it is formatted correctly.
Labels (2)
10 Replies
Anonymous
Not applicable
Author

hi,
may be an end line character not recognize by notepad,
did you try with ultraedit or other ??
Anonymous
Not applicable
Author

hi,
may be an end line character not recognize by notepad,
did you try with ultraedit or other ??

if I open with another text editor it view correctly. I have observed, that if I open with microsoft wordpad (do you know?) and save as "Text Document - MSDOS Format", and open it again with notepad it view correctly.
Anonymous
Not applicable
Author

I'm tried to create a text file filled with data from a database using tfileOutputPositional. Job work correctly, but if i open file with Notepad his content is not formatted. How can i solve this issue? (See image below)
Notice: If I open file with MFC Wordpad e save it as "Text Document - MS-DOS format", when reopen file, it is formatted correctly.

I have tried this solution with TOS 2.1.1 and it works.
use "\r\n" as row separator in your modules tFileOutputPositional
to change existing modules tFileOutputPositional you have to edit the jet-files (ex with Wordpad).
You can find this files here:
\plugins\org.talend.designer.components.localprovider_???\components\ tFileOutputPositional\tFileOutputPositional_main.???

Replace : sb_tFileOutputPositional_1.append("\n"); by sb_tFileOutputPositional_1.append("\r\n");
Notice : CRLF, acronyme de Carriage Return ("\r" retour chariot) + Line Feed ("\n" saut de ligne) = "\r\n"
Anonymous
Not applicable
Author

I'm tried to create a text file filled with data from a database using tfileOutputPositional. Job work correctly, but if i open file with Notepad his content is not formatted. How can i solve this issue? (See image below)

Notice: If I open file with MFC Wordpad e save it as "Text Document - MS-DOS format", when reopen file, it is formatted correctly.

I have tried this solution with TOS 2.1.1 and it works.

use "\r\n" as row separator in your modules tFileOutputPositional

to change existing modules tFileOutputPositional you have to edit the jet-files (ex with Wordpad).
You can find this files here:
\plugins\org.talend.designer.components.localprovider_???\components\ tFileOutputPositional\tFileOutputPositional_main.???


Replace : sb_tFileOutputPositional_1.append("\n"); by sb_tFileOutputPositional_1.append("\r\n");

Notice : CRLF, acronyme de Carriage Return ("\r" retour chariot) + Line Feed ("\n" saut de ligne) = "\r\n"
Wonderful!!! I have tried this solution right now and it works!!!
file .javajet was lightly different, it was:

...

//get and format output String end
<%
}
%>
sb_<%=cid %>.append("\n");
out<%=cid %>.write(sb_<%=cid %>.toString());
nb_line_<%=cid %>++;
<%
}
...

and i have replaced "sb_<%=cid %>.append("\n");" line by "sb_<%=cid %>.append("\r\n");"

Thank you very much!!!
Anonymous
Not applicable
Author

Is this a general problem? If so, I think it make sense to open a bug / feature request: Creating linebreaks in dependency to the operating system (unix / dos) / or alternatively give a option to the component to decide it.
Anonymous
Not applicable
Author

Is this a general problem? If so, I think it make sense to open a bug / feature request: Creating linebreaks in dependency to the operating system (unix / dos) / or alternatively give a option to the component to decide it.

This is a general problem. I will create a bug/feature request today.

Cheers, Kaiser.
Anonymous
Not applicable
Author

Hello
This feature has already be opened 1680
Regards,
Michaël.
Anonymous
Not applicable
Author

Hello Michaël,
thanks for the information. I don't know how the detailed resolution looks like, but I think it would be user friendly if:
* The default (prefilled in the gui) is set to the system-specific value (but there is a problem with different systems for generating / executing the script).
* I f you enter nothing, talend would use system specific linebreaks.
* Give a flag to select "use system specific linebreak".
So the user don't have to be worry about the operating system and special behaviors.
Bye
Volker
Anonymous
Not applicable
Author

Hello

This feature has already be opened 1680

Regards,
Michaël.

too late!!! I have added a new bug in bugtracker.