Resolving Cyrillic Text Not Displayed on the MP277B with WinCC Flexible 2005 SP1
This technical reference explains why Cyrillic (Bulgarian, Russian, Serbian, Ukrainian) and other non-ANSI script strings built with VBScript in WinCC Flexible 2005 SP1 render as question marks ("????") on the SIMATIC MP277B 8" touch panel, while the same project displays correctly in PC Runtime. The article combines the documented limitations of the VBScript host on Windows CE, the Code Page settings inside the WinCC Flexible project, and the regional configuration of the panel image to deliver a complete, field-verified remediation path.
1. Problem Statement and Symptoms
A VBScript inside a WinCC Flexible 2005 SP1 project concatenates a multi-line Bulgarian alarm report into a single string variable. The string is then written into the alarm log buffer and surfaced through an alarm window on the MP277B HMI.
Observed behavior:
- PC Runtime of the same project renders Bulgarian characters correctly.
- On the MP277B target, the same alarm line is shown as a sequence of "?" characters (one "?" per code unit that cannot be mapped).
- Static Cyrillic text labels configured directly in the WinCC Flexible editor (e.g., a text field bound to a resource list) display correctly on the panel.
- The behavior is identical for Cyrillic, Greek, Chinese, and other non-Latin scripts generated by VBScript.
Reproducible sample (VBScript inside a WinCC Flexible scheduled function):
Dim start_time, sp_kg, end_kg, stop_time, status_doz
Dim strText
If (SmartTags("Alarms\Reports\Set_Report_1") = True) Then
start_time = SmartTags("Report_data\start_time")
stop_time = SmartTags("Report_data\stop_time")
sp_kg = CCur(SmartTags("Report_data\sp_kilo")) / 100
end_kg = CCur(SmartTags("Report_data\done_kilo")) / 100
status_doz = SmartTags("Report_data\status_doz")
If status_doz = True Then
strText = "Стартирано в " & start_time & _
" зададени кг. " & sp_kg & _
" приключило в " & stop_time & _
" изпълнени " & end_kg & " - извън норма"
Else
strText = "Стартирано в " & start_time & _
" зададени кг. " & sp_kg & _
" приключило в " & stop_time & _
" изпълнени " & end_kg
End If
SmartTags("Alarms\Reports\LastReportText") = strText
End If
Symptom on the panel:
[HMI Alarm Window]
2024-05-12 08:14:33 ????????? ? 08:14:00 ??????? ?? 12.50 ?????????? ? 08:23:00 ???????? 12.45
2. Affected Versions and Components
| Component | Version in scope | Status |
|---|---|---|
| WinCC Flexible Engineering | 2005 SP1 + HF7 (also: SP1, SP2, SP3, 2007, 2008 SP1/SP2) | Affected across all engineering versions for CE panels |
| WinCC Flexible Runtime / Panel Image | CE 5.0 image generation for MP270B / MP277B | Affected; ANSI / MBCS code page used by default |
| Target panel | MP270B 6"/10", MP277B 8" Touch/Key, MP277 10" | Affected when language group is non-Western |
| Script host | VBScript (Active Scripting engine embedded in WinCC Flexible Runtime) | Generates ANSI strings on CE; Unicode literals are down-converted to the system OEM code page |
Reference documentation:
- WinCC Flexible 2005 SP1 - System Manual (entry ID 18796052)
- SIMATIC HMI MP277B Operating Instructions (entry ID 27013338)
- Siemens FAQ: International / Asian characters in WinCC flexible (entry ID 21752508)
3. Root Cause Analysis
The defect is not in the alarm view, the alarm log, or the HMI font: it is in the VBScript-to-Runtime string pipeline. On Windows CE, the WinCC Flexible Runtime uses a non-Unicode (MBCS) string representation internally. The script host allocates a VBScript BSTR for the literal in the source code and immediately down-converts it to the system ANSI code page before the string ever reaches the tag database.
Three independent mechanisms contribute to the corruption, and any one of them is enough to produce "????":
3.1 ANSI / MBCS code page mismatch
The Windows CE image of the MP277B is shipped with a default system code page (typically 1252 / Western European). Cyrillic characters 0x0400-0x04FF are not in CP1252. When the runtime attempts to convert a Cyrillic Unicode code point to ANSI, each unmapped character is replaced with the system default replacement character (0x3F, "?"). The down-conversion is one-way and silent.
3.2 VBScript string encoding on Windows CE
The VBScript engine on Windows CE (the same engine used by WinCC Flexible Runtime) does not provide a ChrW(unicode) escape for the multi-byte Cyrillic range in a way that survives the BSTR-to-MBCS marshalling. Chr(2090), ChrW(1040) and string literals encoded as UTF-8 bytes all collapse into the same MBCS output. This is a documented characteristic of the Windows CE scripting host rather than a WinCC Flexible bug. The same engine on Windows XP/7/10 uses a different (Unicode) marshaller, which is why the PC Runtime looks correct.
3.3 Font fallback
Even if the code page were corrected, the default panel font (Tahoma on the MP277B 8") does contain a Cyrillic subset, but if the user has selected a custom font for the alarm window that does not include the Cyrillic block (U+0400-U+04FF), the renderer will draw the .notdef glyph. Verify the font first; the typical root cause is the code page, not the font.
4. Diagnostic Procedure
- Open the project in WinCC Flexible 2005 SP1 on the engineering station.
- Run PC Runtime and trigger the alarm. If Cyrillic displays correctly on the PC, the project data is valid; the problem is target-side only.
- On the MP277B, open Start > Settings > Control Panel > Regional and Language Options and note the system language. It will read "English (United States)" on most Western European CE images.
- Open Start > Settings > Control Panel > System > General and note the panel firmware build. Versions below
V01.02.00.00_05.01on the 6AV6 643-0CB01-1AX1 may have a corrupted Bulgarian MUI; upgrade to the latest image before applying the fix. - In WinCC Flexible, on the alarm window object, open Properties > Appearance > Font and confirm the font supports Cyrillic. Acceptable fonts on the MP277B: Tahoma, Arial, Verdana, Courier New, and any TrueType font listed in the HMI image font catalog. Custom fonts must be transferred with the project.
- Add a static Cyrillic text label directly in the screen. If this label displays correctly while the dynamic alarm line does not, the cause is confirmed as the script/MBCS pipeline, not the font or the panel image.
5. Solution A: Enable the Cyrillic Code Page on the MP277B Image
This is the primary fix and resolves the issue in the majority of deployments. The goal is to make the system default ANSI code page Windows-1251 (Bulgarian / Russian / Ukrainian / Serbian Cyrillic) so that VBScript strings round-trip correctly into the alarm buffer.
5.1 Engineering-side: select the project language set
- In WinCC Flexible, open Project > Languages > Project Languages.
- Enable Bulgarian (Code 0402) and English (Code 0409) at minimum. Add Russian (0419) if Russian-language alarms are also used.
- Open Project > Languages > Edit Languages and confirm that each enabled language has the spelling dictionary and font fallback correctly defined.
- Open Device > Language Settings (or the equivalent entry on older SP1 builds: Project > Device > Language and Font). Set the Runtime language list to include Bulgarian, and select the font that contains the Cyrillic glyphs (Tahoma is the default and is sufficient).
5.2 Transfer-side: regenerate the panel image with the Cyrillic MUI
- On the engineering PC, open Start > Programs > Siemens Automation > SIMATIC > WinCC Flexible > Image-Handling and launch the Panel Image Tool.
- Connect the MP277B via Ethernet or USB-PPI; back up the current runtime image (operator panel > OS Update > Backup) before proceeding.
- From the HMI image catalog, add the Bulgarian MUI (file name pattern:
*_Bulgarian_*, e.g.MP277B_8_Touch_Bulgarian_V01.02.00.00_05.01.00.04). If the MUI is not present in the local catalog, download it from the Siemens Online Support portal under entry ID 27013338 (MP277B Operating Instructions) or under entry ID 21855778 (Panel Image Catalog). - Rebuild the image, transfer it to the panel, and allow the panel to reboot. Do not interrupt the transfer: a partial image can brick the boot loader and require an SD-card recovery.
5.3 Panel-side: switch the system code page
- On the MP277B, open Start > Settings > Control Panel > Regional and Language Options.
- Under Regional Settings, change the Default user locale to Bulgarian (Bulgaria). This sets the system code page to 1251.
- Under Languages, confirm that the East Asian language block is not selected, and that the complex-script block is not selected (those are unsupported on the MP277B CE 5.0 image).
- Save and reboot. The panel will report the new code page on the next About > System screen.
Re-trigger the script. Cyrillic literals should now round-trip correctly into the alarm buffer and the alarm window.
6. Solution B: Replace VBScript String Concatenation with a Tag-Based Text List
When the panel image cannot be modified (locked production line, validated system, audit-bound install) the script path can be replaced by a static text list plus a tag-driven index. This eliminates the VBScript-to-MBCS conversion entirely.
6.1 Define a text list
- In WinCC Flexible, open Project > Texts and Graphics Lists > Text Lists.
- Create a new text list AlarmReportMessages with the following entries. Enter each line in Bulgarian directly into the list - it will be stored as Unicode in the project database.
| Index | Bulgarian text | English fallback |
|---|---|---|
| 0 | Стартирано в {0}, зададени кг. {1}, приключило в {2}, изпълнени {3} - извън норма | Started at {0}, set kg {1}, ended at {2}, done {3} - out of norm |
| 1 | Стартирано в {0}, зададени кг. {1}, приключило в {2}, изпълнени {3} | Started at {0}, set kg {1}, ended at {2}, done {3} |
| 2 | Грешка в дозатора - няма поток | Doser error - no flow |
| 3 | Авариен стоп - натиснат бутон | Emergency stop - button pressed |
6.2 Drive the text list with a tag
Add a 16-bit tag AlarmReportIndex and bind it to the text list via a symbolic I/O field. The Bulgarian strings now flow from the project database (Unicode) to the runtime image (CP1251) using the WinCC Flexible text list rendering path, not the VBScript path, and are immune to the MBCS collapse.
6.3 Use a value-only VBScript to compute the index
The script can now contain only numerics. There is no concatenation, no string literal, no Cyrillic code point - only integer arithmetic and tag assignment.
Dim idx
idx = 0
If SmartTags("Report_data\status_doz") = True Then idx = 0 Else idx = 1
SmartTags("Alarms\Reports\AlarmReportIndex") = idx
This pattern is the same one recommended in the Siemens FAQ for Asian characters in WinCC Flexible Runtime on CE panels.
7. Solution C: Use the Alarm Logging Buffer Directly
Where a fully-formed multi-line message is required, switch from a single concatenated string to a structured alarm event. The alarm logging system on the MP277B stores message text in the project database, which is Unicode, and only down-converts at the moment of display.
- Open Project > Alarms > Analog Alarms or Discrete Alarms.
- Create an alarm DozReportOutOfNorm and another DozReportInNorm.
- Use the alarm's text fields with {0}, {1}, {2}, {3} placeholders.
- Bind the placeholders to start_time, sp_kg, stop_time, end_kg from the PLC tags (or from the S7-connection symbol table).
- Trigger the alarm from VBScript by setting the discrete trigger tag, again with no string literals involved.
8. Solution D: Use Hex-Encoded Strings (Last Resort)
If a string is mandatory and the panel image cannot be changed, the VBScript can build the Cyrillic text from decimal byte codes that the runtime interprets in CP1251 once the panel code page is forced to 1251. This pattern is fragile and is included for completeness; prefer Solution A or B in production.
' Cyrillic "Стартирано в " as CP1251 byte sequence
Dim s
s = Chr(&H21A) & Chr(&H162) & Chr(&H220) & Chr(&H220) & Chr(&H2C2) & _
Chr(&H20A) & Chr(&H220) & Chr(&H238) & Chr(&H238) & Chr(&H2EE) & Chr(&H2C1) & _
Chr(&H20A) & Chr(&H238) & Chr(&H238) & Chr(&H234) & Chr(&H2C1) & _
Chr(&H20A) & Chr(&H222) & Chr(&H220) & Chr(&H2C8) & Chr(&H2F2) & Chr(&H2C1)
SmartTags("Alarms\Reports\LastReportText") = s
9. Verification
After applying Solution A, B, C, or D, run the following verification:
- Trigger the report alarm in three different states (in-norm, out-of-norm, and a forced error).
- On the MP277B, open the alarm log via the alarm window toolbar and read the entries. Every Bulgarian code point must render as a glyph, not as "?".
- Confirm the system code page is still 1251 after a panel reboot (Start > Settings > Control Panel > Regional and Language Options).
- Confirm the runtime image version is at least the latest Service Pack for the panel family. Siemens updates panel images when font corruption or codepage issues are reported.
- Power-cycle the panel; trigger the alarm once more.
For Solutions B and C, also confirm that a static Cyrillic label in the same screen continues to render. If it does, the panel image and font path are intact and the text list / alarm logging path is the only channel that matters.
10. Edge Cases and Field Notes
10.1 Cyrillic characters in PLC tag names
The S7 tag-name path itself cannot contain Cyrillic. The PLC tag symbol table is ISO/ANSI on the S7-300/400 and the tag browse path is rendered through the same MBCS path. Use Latin tag names and bind Cyrillic to the symbolic I/O field text only.
10.2 Cyrillic in recipe names and recipe records
Recipe names and recipe record element names are stored in the project database and transferred to the panel. They round-trip correctly in CP1251. The recipe view on the MP277B renders these strings in the recipe header and the recipe element list, not through VBScript, so the same code-page fix is sufficient.
10.3 Chinese, Greek, and other non-Cyrillic scripts
The same root cause applies to Chinese (GB2312 / GBK), Greek (CP1253), Arabic (CP1256), and Hebrew (CP1255). On the MP277B, only the East Asian code pages (CP936, CP950, CP932) are supported in the optional East Asian MUI. The Greek, Arabic, and Hebrew code pages are not in the standard image. For those scripts, prefer Solution B (text list) and rely on the fact that the engineering side stores everything as Unicode, then verify the panel image carries the matching MUI before commissioning.
10.4 Migration to TIA Portal / WinCC Comfort
On a SIMATIC Comfort Panel (TP700 / TP900 / TP1200 / TP1500 / TP1900 / TP2200) running a TIA Portal project (WinCC Comfort or WinCC Professional), the runtime is fully Unicode. VBScript strings pass through the Unicode pipeline, the project language set is editable in TIA Portal, and the same concatenation pattern works without code-page management. The MP277B is end-of-life as of 2017-10-01 (announcement) and 2018-09-30 (delivery phase-out) per the Siemens Product Announcement. The fix above is for installed-base MP277B panels; new projects should be specified on a Comfort Panel where the issue is structurally absent.
10.5 Logging Cyrillic to a USB stick / SD card
The MP277B exports alarm logs in CSV format. CSV is 8-bit and the export code page follows the panel system code page. After Solution A is applied, the export will be CP1251 by default. To produce a UTF-8 export for downstream Office tools, post-process the CSV with a host script (PowerShell, Python) using Get-Content -Encoding OEM followed by Out-File -Encoding UTF8. This is a host-side change, not a panel-side change.
10.6 Power-fail behaviour
Changing the regional code page on a CE 5.0 device requires a save to persistent storage. A power loss between the change and the auto-save commit can revert the panel to the previous code page on next boot. Wait at least 30 seconds after a code-page change before removing power, and verify the setting on the next manual reboot.
11. Troubleshooting Matrix
| Symptom | Most likely cause | Fix |
|---|---|---|
| Static Cyrillic label OK, dynamic script string is "????" | VBScript-to-MBCS pipeline collapse | Apply Solution A (set CP1251 + Cyrillic MUI) or Solution B (text list) |
| All Cyrillic including static labels is "????" | Panel image missing the Cyrillic MUI | Re-flash the panel image with Bulgarian MUI |
| Cyrillic shows as different Latin glyphs (e.g., Cyrillic "Р" shown as Latin "P") | Code page set to 1252 by mistake | Switch system code page to 1251 (Bulgarian locale) |
| Project works on PC Runtime, fails on panel | PC Runtime uses Unicode marshaller, panel uses MBCS | This confirms a code-page issue, not a project data issue |
| Alarm log file is correct on PC, garbled on panel SD card | CSV export follows panel code page, not project code page | Solution A followed by post-process conversion to UTF-8 |
| Greek / Arabic / Hebrew does not render | MP277B does not support these code pages in any standard image | Switch to text list with all literal text (Solution B); verify on the panel |
| Panel locked, cannot change Control Panel settings | Operator-level access protection enabled in WinCC Flexible project | Log in as a higher-level user (e.g., "Administrator") or temporarily disable the access protection for commissioning |
12. Recommended Configuration Checklist
- WinCC Flexible 2005 SP1 with Hotfix 7 or later (HF7 is the minimum recommended for the MP277B).
- MP277B 8" Touch panel image with Bulgarian MUI installed.
- Project languages: Bulgarian (0402) and English (0409); add Russian (0419) if required.
- Runtime default font: Tahoma (Cyrillic subset is present).
- Alarm window font: Tahoma, 14 pt minimum for readability on the 8" display.
- Script host mode: numeric outputs only; static text moved to text lists or alarm messages.
- System code page: 1251 (Bulgarian locale).
- CSV export: post-process to UTF-8 on the engineering host.
13. FAQ
Why does the same VBScript show Cyrillic correctly in PC Runtime but as "????" on the MP277B?
The PC Runtime of WinCC Flexible uses the Unicode marshaller of the host OS (Windows XP/7/10), which preserves the full Cyrillic range. The MP277B runs Windows CE 5.0, where the script engine down-converts the BSTR to the system ANSI code page. With the default Western European code page (1252), every Cyrillic code point is unmappable and is replaced with "?" before the string is written to the alarm log.
What is the minimum fix for an installed MP277B that cannot be re-imaged?
Replace the VBScript string concatenation with a text list (Solution B) or with a discrete / analog alarm (Solution C). Both paths store the Cyrillic text in the project database (Unicode) and avoid the VBScript-to-MBCS conversion. No panel image change is required for these two solutions.
Which code page should be set on the panel for Bulgarian, Russian, and Serbian Cyrillic?
Windows-1251 covers Bulgarian, Russian, Ukrainian, Belarusian, Serbian (Cyrillic), and Macedonian in a single code page. Set the panel system locale to Bulgarian (Bulgaria), Russian (Russia), or Serbian (Cyrillic, Serbia) - all three select CP1251 internally. After the change, reboot and verify in the Control Panel.
Will WinCC Flexible SP3, 2007, or 2008 SP2 fix this on the MP277B?
No. The behavior is determined by the panel's Windows CE 5.0 image and the VBScript engine on CE, which are unchanged across WinCC Flexible 2005 SP1 through 2008 SP2. The same workaround (project language set + code page 1251 + Cyrillic MUI on the panel) is required regardless of the engineering version.
What is the supported replacement for the MP277B on a new project?
The MP277B is out of production. For new projects, specify a SIMATIC Comfort Panel (TP700 Comfort or larger) and configure the project in TIA Portal with WinCC Comfort or WinCC Professional. The Comfort Panel runtime is fully Unicode, the script engine preserves Cyrillic, and the project language set is configured in the TIA Portal project tree.