summaryrefslogtreecommitdiff
path: root/media
diff options
context:
space:
mode:
authorglx22 <glx22@users.noreply.github.com>2020-05-19 17:42:29 +0200
committerGitHub <noreply@github.com>2020-05-19 17:42:29 +0200
commitf6223f8ac266f75fdc55f2d9daf0f8574235844a (patch)
treed3c72cbf4f5802764bd07eed04b4b6d806aa35be /media
parentb8a896d52cdb9e2423b5fd745cc3d72d1ce7e09d (diff)
downloadopenttd-f6223f8ac266f75fdc55f2d9daf0f8574235844a.tar.xz
Fix #8161, e31def197: Lang files may have LF EOL (#8163)
Diffstat (limited to 'media')
-rw-r--r--media/baseset/translations.vbs3
1 files changed, 2 insertions, 1 deletions
diff --git a/media/baseset/translations.vbs b/media/baseset/translations.vbs
index 8632ef069..c16788693 100644
--- a/media/baseset/translations.vbs
+++ b/media/baseset/translations.vbs
@@ -65,11 +65,12 @@ Sub Lookup(ini_key, str_id, outfile)
Dim f
Set f = CreateObject("ADODB.Stream")
f.Charset = "utf-8"
+ f.LineSeparator = 10 ' Assume lines end with \n even for \r\n files
f.Open
f.LoadFromFile(file.Path)
Do Until f.EOS
- line = f.ReadText(-2)
+ line = Replace(f.ReadText(-2), Chr(13), "") ' Read a line and remove any \r
If InStr(1, line, "##isocode ") = 1 Then
p = Split(line)