mojira.dev
MC-106136

Non-Breaking space (" ") prints as "[NBSP]" from command block (incorrectly), but from chat it prints as " " (correctly)

Execute this command from chat, then from command block.

/title @p actionbar {"text":"3   non-breaking-spaces"}

or this one:

/tellraw @p {"text":"3   non-breaking-spaces"}

or any other text related JSON command even nested in execute:

/execute @p ~ ~ ~ /tellraw @p {"text":"3   non-breaking-spaces"}

Expected:

  • same output:

    3   non-breaking-spaces

Actual:

  • different output:
    CHAT:

    3   non-breaking-spaces

    COMMAND BLOCK:

    3non-breaking-spaces

Possible cause:

  • The way text is parsed and formatted from chat is different from command blocks.

( is used to represent the 'bugged' [nbsp] character)

Linked issues

Attachments

Comments 5

Non-breaking spaces do not get converted to spaces in a command block, but they are converted when sending chat messages. I think this is intended.

Can confirm for MC 1.12.1.

I can't reproduce in 1.12.1.

Oops! Misunderstood the bug, sorry.

When I run one of the commands directly as a player, the output is

3 non-breaking spaces

When I run one of the commands in a command block, the output is

3   non-breaking-spaces

I thought the bug was that multiple nb-spaces are omitted in a command when you run it directly as a player while they aren't when you run it in a command block. Didn't catch the "bugged" character part for some reason.

So, cannot reproduce in 1.12.1, or at least, cannot reproduce as described in the ticket's description.

AgentM

(Unassigned)

Confirmed

JSON, non-breaking-space, text

Minecraft 1.10.2, Minecraft 16w32a, Minecraft 16w32b

Minecraft 1.12.1

Retrieved