Community AlphaAlpha MUADMINS
ENEnglish
Sign in
On MuADMINSConfig ScannerDrop your files zip: rates, drops, spots, limitsOpenOn MuADMINSMeet us on DiscordAsk for help, share what you are building and talk MU with other server owners.Open
← All solutions

Korean, Cyrillic, Greek or other character names turn into ?? (collation and Unicode in MU databases)

Written by MuADMINS from the sourceNot verified

In every MSSQL files family we read, names are VARCHAR: Character.Name varchar(10), AccountCharacter.GameID1 ... varchar(10), Guild.G_Name varchar(8), MEMB_INFO.memb___id varchar(10). A VARCHAR column stores text in the code page of its collation. IGCN CreateDatabase.sql creates all databases with COLLATE SQL_Latin1_General_CP1_CI_AS (Latin code page) and the IGCN Season 9 script even sets that collation on 116 columns: any letter outside that code page is saved as ?.

  1. See what you have:
SELECT name, collation_name FROM sys.databases;
SELECT COLUMN_NAME, COLLATION_NAME FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 'Character' AND COLUMN_NAME = 'Name';
  1. New server: create the empty database with the collation of your language before running the pack scripts (for Korean for example Korean_Wansung_CI_AS), and keep it case insensitive (_CI_, the IGCN documentation asks for it). With a double byte code page each Korean letter uses 2 of the 10 bytes, so names are 5 letters at most.
  2. Existing server: changing VARCHAR to NVARCHAR is a big migration (see the Unicode migration review). Whether the game then shows the names correctly is decided by the server files and the client, not by SQL: test with one name on a copy first.
  3. Website and game databases with different collations give "Cannot resolve the collation conflict" errors; DmN's procedures avoid it with COLLATE Database_Default in their comparisons.

Source: IGCN S16 / S17 / S18 CreateDatabase.sql, IGCN S9 MuOnline(MD5).sql (116 COLLATE clauses), Character / AccountCharacter / Guild definitions in the IGCN, X-Team, MuDevs scripts, DmN CMS 1.2.3 procedures.

Written by MuADMINS
Did this help?

Still stuck? Search MuGPS Ask the MU Assistant

MuADMINS Community Alpha: free and community made, in active development.