The Welkin Suite Forum

Error displaying and assert Japanese string

Error displaying and assert Japanese string

  • Please log in to reply



    Posted 10 Aug 2016


    I wrote this code of Apex Test Class:

    System.assertEquals('åå‰ã‚’入力ã—ã¦ãã ã•ã„。',ApexPages.getMessages()[0].getDetail());

    Test Result show this message in broken font:

    System.AssertException: Assertion Failed: Expected: ????????????, Actual: ページ分ã‘ã®ã‚«ã‚¹ã‚¿ãƒ è¨­å®šãŒä½œæˆã•ã‚Œã¦ã„ã¾ã›ã‚“。


    My origin source code has this code:

    if(item.DisplayStatus__c == '表示'){

    However, after press F5 to push to salesforce, it became:

    if(item.DisplayStatus__c == 'éžè¡¨ç¤º'){

    Please help me or suggest any solution for this problem. Thanks all.[attachment=136:error2.jpg][attachment=137:error1.jpg]

    1 replies to this topic



      Posted 10 Aug 2016


      Thank you for your contacting us with this information.

      You can find the settings related to encoding using the following way: Main Menu -> File -> Advanced Save Options. This option is available for you when any file is opened in the Code Editor.

      I kindly ask to open these settings and select the type of encoding that applies for your case. After changing this, please save your Apex Test Class.

      Please let us know if your issue is reproduced after these steps.

      Thank you,


      Kate Dulko
      Customer Relations

      The Welkin Suite

      twitter: @KateDulko
      skype id: d_katerina



      Boost Your Productivity. Get Started Today

      Try Free Trial