Sublime Forum

Try edit text files in Heroes 3, sublime change (rewrite) wrong Line Ending when opening file (game crash after)

#1

when opening text file with windows cr lf line ending, sublime opened it in Unix always. With notepad++ work normal

my prefs

{
	"default_line_ending": "windows",
	"show_line_endings": true,
	"show_encoding": true,
	"fallback_encoding": "Cyrillic (Windows 1251)",
	"default_encoding": "Cyrillic (Windows 1251)",
}

trying on different version and operating system
Download file

Watch the problem Youtube

0 Likes

#2

The video is private. Note that ST detects line endings when reading a file, the “default_line_ending” setting only affects the line endings of files you newly create using ST.

1 Like

#3

sorry changed video on youtube to public

0 Likes

#4

the problem is that sublime changed line ending when opening file to Unix and this file dosnt work in game after that the game crashing!!!
notepad++ working correctly in that case

0 Likes

#5

Could you provide the file you’re having this problem with?

0 Likes

#7

the link is in the description

0 Likes

#8

That file has both unix and windows line endings. Sublime Text always normalizes line endings; files with mixed line endings are not supported.

0 Likes

#9

there must be option to disable normalizing line endings, because without that, after editing in sublime game crashing

0 Likes

#10

  • Unix (LF): 0A
  • Windows (CRLF): 0D 0A

we have Windows where do you see both?

0 Likes

#11

Look further down the file:

0 Likes

#12

its not a text files))))

Technically the text files are CSV files that use CRLF as row change, TAB as column separator, and LF within single cell (or text item) as a line change. This last thing is why you CAN’T use most text editors to work with the files as they tend to enforce only one type of line change and interpret the line changes within a single cell item to start a new row.

but notepad++ can edit it

0 Likes