mirror of
https://github.com/infinitefusion/infinitefusion-e18.git
synced 2025-12-07 21:24:59 +00:00
Forced encoding of text to UTF-8
This commit is contained in:
@@ -2,6 +2,8 @@
|
|||||||
$VERBOSE = nil
|
$VERBOSE = nil
|
||||||
Font.default_shadow = false if Font.respond_to?(:default_shadow)
|
Font.default_shadow = false if Font.respond_to?(:default_shadow)
|
||||||
Graphics.frame_rate = 40
|
Graphics.frame_rate = 40
|
||||||
|
Encoding.default_internal = Encoding::UTF_8
|
||||||
|
Encoding.default_external = Encoding::UTF_8
|
||||||
|
|
||||||
def pbSetWindowText(string)
|
def pbSetWindowText(string)
|
||||||
System.set_window_title(string || System.game_title)
|
System.set_window_title(string || System.game_title)
|
||||||
|
|||||||
@@ -726,8 +726,8 @@ module PluginManager
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
if scripts.length > 0
|
|
||||||
echoln ""
|
echoln ""
|
||||||
|
if scripts.length > 0
|
||||||
Console.echo_h2("Successfully loaded #{scripts.length} plugin(s)", text: :green)
|
Console.echo_h2("Successfully loaded #{scripts.length} plugin(s)", text: :green)
|
||||||
else
|
else
|
||||||
Console.echo_h2("No plugins found", text: :green)
|
Console.echo_h2("No plugins found", text: :green)
|
||||||
|
|||||||
@@ -101,6 +101,7 @@ module Compiler
|
|||||||
if lineno == 1 && line[0].ord == 0xEF && line[1].ord == 0xBB && line[2].ord == 0xBF
|
if lineno == 1 && line[0].ord == 0xEF && line[1].ord == 0xBB && line[2].ord == 0xBF
|
||||||
line = line[3, line.length - 3]
|
line = line[3, line.length - 3]
|
||||||
end
|
end
|
||||||
|
line.force_encoding(Encoding::UTF_8)
|
||||||
if !line[/^\#/] && !line[/^\s*$/]
|
if !line[/^\#/] && !line[/^\s*$/]
|
||||||
line = prepline(line)
|
line = prepline(line)
|
||||||
if line[/^\s*\[\s*(.*)\s*\]\s*$/] # Of the format: [something]
|
if line[/^\s*\[\s*(.*)\s*\]\s*$/] # Of the format: [something]
|
||||||
@@ -159,6 +160,7 @@ module Compiler
|
|||||||
if lineno == 1 && line[0].ord == 0xEF && line[1].ord == 0xBB && line[2].ord == 0xBF
|
if lineno == 1 && line[0].ord == 0xEF && line[1].ord == 0xBB && line[2].ord == 0xBF
|
||||||
line = line[3, line.length - 3]
|
line = line[3, line.length - 3]
|
||||||
end
|
end
|
||||||
|
line.force_encoding(Encoding::UTF_8)
|
||||||
if !line[/^\#/] && !line[/^\s*$/]
|
if !line[/^\#/] && !line[/^\s*$/]
|
||||||
if line[/^\s*\[\s*(.+?)\s*\]\s*$/]
|
if line[/^\s*\[\s*(.+?)\s*\]\s*$/]
|
||||||
yield lastsection, sectionname if havesection
|
yield lastsection, sectionname if havesection
|
||||||
@@ -185,6 +187,7 @@ module Compiler
|
|||||||
if lineno == 1 && line[0].ord == 0xEF && line[1].ord == 0xBB && line[2].ord == 0xBF
|
if lineno == 1 && line[0].ord == 0xEF && line[1].ord == 0xBB && line[2].ord == 0xBF
|
||||||
line = line[3, line.length - 3]
|
line = line[3, line.length - 3]
|
||||||
end
|
end
|
||||||
|
line.force_encoding(Encoding::UTF_8)
|
||||||
yield line, lineno if !line[/^\#/] && !line[/^\s*$/]
|
yield line, lineno if !line[/^\#/] && !line[/^\s*$/]
|
||||||
lineno += 1
|
lineno += 1
|
||||||
}
|
}
|
||||||
@@ -199,6 +202,7 @@ module Compiler
|
|||||||
if lineno == 1 && line[0].ord == 0xEF && line[1].ord == 0xBB && line[2].ord == 0xBF
|
if lineno == 1 && line[0].ord == 0xEF && line[1].ord == 0xBB && line[2].ord == 0xBF
|
||||||
line = line[3, line.length - 3]
|
line = line[3, line.length - 3]
|
||||||
end
|
end
|
||||||
|
line.force_encoding(Encoding::UTF_8)
|
||||||
if !line[/^\#/] && !line[/^\s*$/]
|
if !line[/^\#/] && !line[/^\s*$/]
|
||||||
FileLineData.setLine(line, lineno)
|
FileLineData.setLine(line, lineno)
|
||||||
yield line, lineno
|
yield line, lineno
|
||||||
@@ -215,6 +219,7 @@ module Compiler
|
|||||||
if lineno == 1 && line[0].ord == 0xEF && line[1].ord == 0xBB && line[2].ord == 0xBF
|
if lineno == 1 && line[0].ord == 0xEF && line[1].ord == 0xBB && line[2].ord == 0xBF
|
||||||
line = line[3, line.length - 3]
|
line = line[3, line.length - 3]
|
||||||
end
|
end
|
||||||
|
line.force_encoding(Encoding::UTF_8)
|
||||||
line = prepline(line)
|
line = prepline(line)
|
||||||
yield line, lineno if !line[/^\#/] && !line[/^\s*$/]
|
yield line, lineno if !line[/^\#/] && !line[/^\s*$/]
|
||||||
lineno += 1
|
lineno += 1
|
||||||
@@ -230,6 +235,7 @@ module Compiler
|
|||||||
if lineno == 1 && line[0].ord == 0xEF && line[1].ord == 0xBB && line[2].ord == 0xBF
|
if lineno == 1 && line[0].ord == 0xEF && line[1].ord == 0xBB && line[2].ord == 0xBF
|
||||||
line = line[3, line.length - 3]
|
line = line[3, line.length - 3]
|
||||||
end
|
end
|
||||||
|
line.force_encoding(Encoding::UTF_8)
|
||||||
line = prepline(line)
|
line = prepline(line)
|
||||||
if !line[/^\#/] && !line[/^\s*$/]
|
if !line[/^\#/] && !line[/^\s*$/]
|
||||||
FileLineData.setLine(line, lineno)
|
FileLineData.setLine(line, lineno)
|
||||||
|
|||||||
Reference in New Issue
Block a user