Skip to content

Unquoted Unicode strings seems to not parse as “bad argument” #25

@toastal

Description

@toastal

See: processone/ejabberd#4559

I was trying to use this in an Ejabberd config

modules:
   mod_invites:
      # Using typographically-correct apostrophe;
      # `'` is incorrect.
      site_name: toastal’s XMPP Server

failing with

2026-04-03 19:55:31.393837+07:00 [critical] <0.119.0>@ejabberd_app:start/2:79 Failed to start ejabberd application: Exception occurred during configuration processing. This is most likely due to faulty/incompatible validator in third-party code. If you are not running any third-party code, please report the bug with ejabberd configuration file attached and the following stacktrace included:
** exception error: bad argument
   in function  iolist_to_binary/1
      called as iolist_to_binary([116,111,97,115,116,97,108,8217,115,32,88,77,
                                  80,80,32,83,101,114,118,101,114,32,105,110,
                                  32,84,104,97,105,108,97,110,100])
      *** argument 1: not an iodata term
   in call from ejabberd_config:replace_keywords/3 (/build/source/src/ejabberd_config.erl:440)
   in call from yconf:'-and_then/2-fun-0-'/3 (yconf.erl:620)
   in call from yconf:validate_option/3 (yconf.erl:1281)
   in call from yconf:validate_options/8 (yconf.erl:1258)
   in call from yconf:'-and_then/2-fun-0-'/3 (yconf.erl:620)
   in call from yconf:validate_option/3 (yconf.erl:1281)
   in call from yconf:validate_options/8 (yconf.erl:1258)

Trying to use Ejabberd config macros, including EJABBERD_MACRO_INVITES_SITE_NAME="toastal’s XMPP Server", also did not work failing on the typographically-correct apostrophe here (the one called 8217). Similar had happened when I tried characters outside the Latin set (such as CJK), but as far as I can tell, these should not require string quoting in YAML like key: "ผิดพลาด" instead of key: ผิดพลาด (this string also fails in the site_name).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions