Uploaded image for project: 'Minecraft (Bedrock codebase)'
  1. Minecraft (Bedrock codebase)
  2. MCPE-173189

[ScriptAPI] Some characters are counted as 2 or 3 characters in the character count check of the setLore() method


    • Confirmed
    • Windows
    • 1077267

      In a previous update, the number of characters in a line of Lore that can be set using the setLore method of the ScriptAPI was limited.
      The setLore method now checks for the number of characters, and if you try to set a Lore that exceeds the limit, the content log will display the number of characters in the string you are trying to set and warn you.
      However, we found that Japanese characters and the "§" symbol are not counted as a single character in the check.


      To confirm this phenomenon, try like the following process (excerpted because it is not important to write all the code) :

      A string of 17 "あ" characters, which are Japanese characters, is specified as Lore.
      The limit is 50 characters, so this string should be able to be set as Lore, but according to the contents log, this string is 51 characters long.
      This means that one "あ" counts for 3 characters.


      Similarly, try like the following value:

      This time, a string made up of 26 "§" symbols is set as Lore.
      In this case, it should still be able to be set as Lore because it does not exceed the limit of 50 characters, but according to the content log, this is a 52-character string that cannot be set as Lore.
      In short, one "§" symbol was counted as two characters.

        1. bug_repo.mcpack
          1 kB
        2. mov1.mp4
          5.02 MB
        3. pic01.png
          33 kB
        4. pic02.png
          36 kB

            Hayamine Hayamine
            1 Vote for this issue
            0 Start watching this issue