Uploaded image for project: 'Confluence Data Center'
  1. Confluence Data Center
  2. CONFSERVER-18903

Why don't we make SQL server use the UNICODE character by default?

    XMLWordPrintable

Details

    • We collect Confluence feedback from various sources, and we evaluate what we've collected when planning our product roadmap. To understand how this piece of feedback will be reviewed, see our Implementation of New Features Policy.

    Description

      In our docs we state:

      Unicode Characters Not Supported By Default

      Problem
      Non-ASCII characters will not be displayed by Confluence.

      Reason
      The default SQL Server dialect uses column types that do not support Unicode, specifically the char, varchar and text column types. See [CONF-4786|CONF-4786@JIRA] for details.

      Solution
      To add Unicode support, use the Unicode SQL Server dialect which uses nchar, nvarchar and ntext column types. Unicode SQL Server dialect has the downside of halving the maximum length of each column from 8000 characters to 4000, as every char is stored in two bytes.

      Enable Unicode SQL Server dialect on a new setup, perform these steps prior to 'Stage 3 - Database Connection Setup' of the [Database Setup For Any External Database]:

      1. Open the <confluence installation folder>\confluence\WEB-INF\classes\database-defaults\mssql.properties file within your Confluence installation folder. In version 2.6 onwards, this file is located in the /confluence/WEB-INF/lib/confluence.x.x.x.jar file. Jar files are similar to zip formats, so you may need to extract the mssql.properties file and place it in \confluence\WEB-INF\classes\database-defaults. You can create the database-defaults directory if it does not exist.
      2. Comment the line: dialect=net.sf.hibernate.dialect.SQLServerDialect
      3. Uncomment the line: #dialect=net.sf.hibernate.dialect.SQLServerIntlDialect
      4. Start the Confluence Setup Wizard

      For existing SQL Server instances wishing to enable Unicode support:

      1. From Confluence, create an XML site backup
      2. From your DBA tool, create a full backup of the Confluence schema contents
      3. Stop Confluence
      4. Move your home directory
      5. Drop all tables from the Confluence schema
      6. Change the dialect to Unicode using the above instructions
      7. Follow the 'Stage 3 - Database Connection Setup' of [Database Setup For Any External Database] to setup the connection again and import the XML backup
      8. Once the Setup Wizard is complete, stop Confluence
      9. Copy any customised content and plugins from your old home directory into the new home directory
      10. Start Confluence

      We should really set this by default. Is there a reason we do not?

      Attachments

        Issue Links

          Activity

            People

              vchoy Vincent Choy (Inactive)
              pkamal Partha
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: