denisenkom / go-mssqldb

Microsoft SQL server driver written in go language
BSD 3-Clause "New" or "Revised" License
1.82k stars 499 forks source link

Fix incorrect or missing mappings between LCIDs and code pages #795

Closed sergeytenmsft closed 9 months ago

sergeytenmsft commented 9 months ago
This change fixes missing / incorrect mappings for some LCIDs: Code Page LCID Collation Example Comment
932 0x40411 Japanese_Bushu_Kakusu_100_CI_AI Added
950 0x21404 Chinese_Traditional_Stroke_Order_100_CI_AI Added
1250 0x0442 Turkmen_100_CI_AI Added
1250 0x141A Bosnian_Latin_100_CI_AI Added
1251 0x046D Bashkir_100_CI_AI Added
1251 0x046D Yakut_100_CI_AI Added
1251 0x201A Bosnian_Cyrillic_100_CI_AI Added
1256 0x0480 Uighur_100_CI_AI Added
1256 0x048C Dari_100_CI_AI Added
1250 0x081A Serbian_Latin_100_CI_AI Moved from 1251

Regarding Serbian collations - there are Latin and Cyrillic code pages for those collations. The LCID 0x081A was incorrectly attributed to the Cyrillic collation (code page 1251) while it should've been Latin (1250).

The way it was tested is via the following script:

codepages.sql.txt

sergeytenmsft commented 9 months ago

This PR picked up lots of unrelated commits, I will need to do over.