FS#3074 - Non ASCII character in squirrel strings

Attached to Project: OpenTTD
Opened by Valentin Perrelle (blustuff) - Friday, 31 July 2009, 20:07 GMT
Last edited by Remko Bijker (Rubidium) - Friday, 31 July 2009, 23:13 GMT
Type Bug
Category Script → NoAI
Status Closed
Assigned To No-one
Operating System Windows
Severity Low
Priority Normal
Reported Version 0.7.1
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No


Version: 7.1
OS: Windows XP

It seems that whenever there is a non ASCII character in string, string concatenations are not correctly done: only the left part of the string is actually returned. I got this problem when using non ASCII character in squirrel code, and also with AI*::GetName functions which return localized names.

For instance this code :

AILog.Info("test " + AIIndustry.GetName(industry_id) + " test");

may print

test Fradworth Centrale Électrique

in french but

test Fradworth Power Station test

in english.
This task depends upon

Closed by  Remko Bijker (Rubidium)
Friday, 31 July 2009, 23:13 GMT
Reason for closing:  Fixed
Additional comments about closing:  In r17013