Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-25374

XML output does not include character encoding in <?xml?> declaration

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open (View Workflow)
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: 10.4.17
    • Fix Version/s: None
    • Component/s: Scripts & Clients
    • Environment:
      openSUSE 15.2

      libmariadb3-3.1.12-lp152.7.1.x86_64
      mariadb-errormessages-10.4.17-lp152.2.8.1.noarch
      mariadb-10.4.17-lp152.2.8.1.x86_64
      mariadb-tools-10.4.17-lp152.2.8.1.x86_64
      mariadb-client-10.4.17-lp152.2.8.1.x86_64

      Description

      When invoking mysql --xml from the command line, the first part of the output is:

      <?xml version="1.0"?>
       
      <resultset ...
      

      Note there is no encoding specified in the XML declaration.

      As long as mysql is outputting UTF-8, this is technically correct because UTF-8 is the default (discussion here).

      However, to avoid any possible confusion, perhaps the XML declaration should include an explicit declaration of the character encoding, e.g.:

      <?xml version="1.0" encoding="UTF-8"?>
       
      <resultset ...
      

      Just a thought...

        Attachments

          Activity

            People

            Assignee:
            Unassigned
            Reporter:
            archie172 Archie Cobbs
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated:

                Git Integration