Dotted and Dotless I Characters Can Break Scripts Written for MetaTrader 4 in Turkey
Turkish has two distinct letters represented by four uppercase and lowercase characters where English has one letter with two forms. Alongside the familiar dotted lowercase i and the plain capital I, the alphabet includes a dotless lowercase ı and a dotted capital İ, with i/İ and ı/I forming separate letter pairs. In Turkish, the uppercase form of i is İ, while the lowercase form of I is ı. Software developers worldwide know this quirk as the Turkey test, a classic check for code that silently assumes English rules when converting text between upper and lower case.
Trading scripts are not immune to the problem. Expert advisors and indicators written for MetaTrader 4 often compare strings to decide what to do, whether matching a symbol name, reading a command from a signal file, or checking a user input such as “buy” or “close”. When an external conversion routine applies Turkish casing rules, a word containing the letter i may no longer match the uppercase version expected by code using English casing rules. If a broker uses a symbol name containing a lowercase i, code that uppercases that symbol under a Turkish locale can end up searching for a ticker that does not exist.

Image Source: Pixabay
External components are where the issue can surface. Many traders extend their platforms with DLLs written in C# or other languages, or connect them to Python and Java tools for data analysis and signal processing. In Java, common case conversion methods use the default locale, while some .NET case conversion methods use the current culture, so the same library can behave perfectly on a machine set to English and fail on one set to Turkish. Developers can avoid the trap by using locale-independent casing or ordinal comparisons for identifiers, commands, and file keys.
Numbers create a related headache. Turkish regional settings commonly use a comma as the decimal separator and a period for thousands, the reverse of common English-language numeric formatting. A CSV file of historical prices exported from a spreadsheet on a Turkish system may write 1,0845 where a script anticipates 1.0845, and a parser expecting a period as the decimal separator may reject the value or interpret it incorrectly, potentially affecting an entire backtest. Lot sizes, stop distances, and risk percentages read from configuration files face the same exposure.
Character encoding adds a third layer. Some older Turkish-language Windows applications and files use the Windows-1254 code page, while newer tools favor UTF-8, so letters such as ş, ğ, and ç can turn into scrambled symbols when a file passes between the two. Trade comments, log entries, and file names containing Turkish characters can be affected, and a script that builds a file path from a user’s Turkish account name may fail to locate its own output.
Testing scripts under different regional settings can help identify these risks. When a commercial expert advisor behaves differently on a Turkish-language system, developers can test whether regional settings are responsible rather than assuming the trading logic is at fault. Checking regional formats is one useful troubleshooting step when a script works on other systems but misbehaves on a Turkish-language computer. Small typographic details rarely feature in conversations about trading strategy, yet in Turkey they can decide whether an automated system runs as designed. For developers working with MetaTrader 4, handling the dotted and dotless i correctly is one part of making sure code also deals reliably with numbers, encodings, and regional settings.

