Odd characters in JavaScript of Forms crashs the view mode, only happen in DXC
Recently, I help solve a weird support case. Customer use Episerver and Forms in a non-built-in language. Let’s say Korean (or East Asian languages).
Create form using Korean language, some broken characters are placed in the LocalizedResources node (in source view). This causes a JavaScript error “$$epiforms is not defined”.
This issue only happen on DXC environment, you cannot reproduce this on local environments (even with Chrome incognito, without Chrome-extensions). I believe the problem is in customer setup. Apply (all) these solutions to fix:
When compose YOUR OWN Korean language XML file, remember these
- It MUST Start with <?xml version=”1.0" encoding=”utf-8" ?>
- It MUST be SAVED and ENCODED in UTF-8. Try to use the Text Editor and save as with Encoding, choose UTF-8
- The page must have encoding as UTF-8. Specify head><meta> tag
- set the <html lang=”your language code”>
- set <meta http-equiv=”Content-Type” content=”text/html; charset=utf-8"/>
Here is (on 2018/04/26) list of built-in support languages in Episerver Forms
EPiServer.Forms_DA.xml
EPiServer.Forms_DE.xml
EPiServer.Forms_EN.xml
EPiServer.Forms_ES.xml
EPiServer.Forms_FI.xml
EPiServer.Forms_FR.xml
EPiServer.Forms_IT.xml
EPiServer.Forms_JA.xml
EPiServer.Forms_NL.xml
EPiServer.Forms_NO.xml
EPiServer.Forms_SV.xml
EPiServer.Forms_ZH.xml