Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ANSICodePage returns zero for Traditional_Spanish_CI_AS collation #61977

Closed
Kaur-Parminder opened this issue Nov 23, 2021 · 9 comments · Fixed by #61992
Closed

ANSICodePage returns zero for Traditional_Spanish_CI_AS collation #61977

Kaur-Parminder opened this issue Nov 23, 2021 · 9 comments · Fixed by #61992

Comments

@Kaur-Parminder
Copy link

Description

CultureInfo.GetCultureInfo(1035).TextInfo.ANSICodePage returns 0 for .Net6 and returns 1252 for .Net5.

Reproduction Steps

Expected behavior

Same as .Net5, it should return 1252.

Actual behavior

returns 0.

Regression?

No response

Known Workarounds

No response

Configuration

No response

Other information

No response

@dotnet-issue-labeler dotnet-issue-labeler bot added area-System.Globalization untriaged New issue has not been triaged by the area owner labels Nov 23, 2021
@ghost
Copy link

ghost commented Nov 23, 2021

Tagging subscribers to this area: @tarekgh, @safern
See info in area-owners.md if you want to be subscribed.

Issue Details

Description

CultureInfo.GetCultureInfo(1035).TextInfo.ANSICodePage returns 0 for .Net6 and returns 1252 for .Net5.

Reproduction Steps

Expected behavior

Same as .Net5, it should return 1252.

Actual behavior

returns 0.

Regression?

No response

Known Workarounds

No response

Configuration

No response

Other information

No response

Author: Kaur-Parminder
Assignees: -
Labels:

area-System.Globalization, untriaged

Milestone: -

@ghost ghost added the in-pr There is an active PR which will close this issue when it is merged label Nov 23, 2021
@tarekgh tarekgh removed the untriaged New issue has not been triaged by the area owner label Nov 23, 2021
@tarekgh tarekgh added this to the 7.0.0 milestone Nov 23, 2021
@Kaur-Parminder
Copy link
Author

Kaur-Parminder commented Nov 24, 2021

@tarekgh Can you specify list of collations that will be impacted by this change? You have mentioned in PR, "cultures which have alternative sorts". Is there way to map with theses patterns https://docs.microsoft.com/en-us/sql/relational-databases/collations/collation-and-unicode-support?view=sql-server-ver15#examples-of-collation-options?

@tarekgh
Copy link
Member

tarekgh commented Nov 24, 2021

@Kaur-Parminder here is the list you are looking for.

    de-DE_phoneb
    es-ES_tradnl
    hu-HU_technl
    ja-JP_radstr
    ka-GE_modern
    x-IV_mathan
    zh-CN_phoneb
    zh-CN_stroke
    zh-HK_radstr
    zh-MO_radstr
    zh-MO_stroke
    zh-SG_phoneb
    zh-SG_stroke
    zh-TW_pronun
    zh-TW_radstr

@ghost ghost removed the in-pr There is an active PR which will close this issue when it is merged label Nov 24, 2021
@Kaur-Parminder
Copy link
Author

@tarekgh I see this fix has been moved 7.0.0 release, Can it be backported to .Net 6?

@Kaur-Parminder
Copy link
Author

@tarekgh I believe the issue exist with Default sort Collations as well e.g 0x10407 (GERMAN_PHONE_BOOK)

@tarekgh
Copy link
Member

tarekgh commented Nov 25, 2021

I see this fix has been moved 7.0.0 release, can it be backported to .NET 6?

How difficult is it to work around this? I guess it should be simple to do so. If you can talk more about your scenario, we can look at porting the fix to .NET 6.0 if it is really a blocker for you.

I believe the issue exist with Default sort Collations as well e.g 0x10407 (GERMAN_PHONE_BOOK)

0x10407 is the de-DE_phoneb which is the alternative sort and not the default sort. It is listed as the first item I mentioned in #61977 (comment). The default sort would be LCID 0x407 which is de-DE. I am not seeing this happening with the default sort.

@Kaur-Parminder
Copy link
Author

@tarekgh Thanks for correcting me. I see, I have read the collations incorrectly.

This issue was reported because I am seeing issues coming in and SqlClient Driver for users switching to .Net6. The Driver is using CodePages which are now returning value 0.

dotnet/SqlClient#1319 (comment)
dotnet/SqlClient#1396 (comment)
dotnet/efcore#26812 (comment)

There is high possibility to see more coming in, as they are popular collations. Regarding workaround, Driver changes for just .Net6 wont be appropriate. If we can know if there is going to be patch release that will help us to inform Driver users.

@tarekgh tarekgh reopened this Nov 26, 2021
@tarekgh
Copy link
Member

tarekgh commented Nov 26, 2021

@Kaur-Parminder thanks for the info. I reopened the issue to look investigate if we can port the fix to .NET 6.0.

@ghost ghost added the in-pr There is an active PR which will close this issue when it is merged label Nov 30, 2021
@ghost ghost removed the in-pr There is an active PR which will close this issue when it is merged label Dec 15, 2021
@tarekgh
Copy link
Member

tarekgh commented Dec 21, 2021

Fixed through the PR #62155

@tarekgh tarekgh closed this as completed Dec 21, 2021
@ghost ghost locked as resolved and limited conversation to collaborators Jan 21, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants