-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
Comments
Tagging subscribers to this area: @tarekgh, @safern Issue DetailsDescriptionCultureInfo.GetCultureInfo(1035).TextInfo.ANSICodePage returns 0 for .Net6 and returns 1252 for .Net5. Reproduction Steps
Expected behaviorSame as .Net5, it should return 1252. Actual behaviorreturns 0. Regression?No response Known WorkaroundsNo response ConfigurationNo response Other informationNo response
|
@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? |
@Kaur-Parminder here is the list you are looking for.
|
@tarekgh I see this fix has been moved 7.0.0 release, Can it be backported to .Net 6? |
@tarekgh I believe the issue exist with Default sort Collations as well e.g 0x10407 (GERMAN_PHONE_BOOK) |
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.
0x10407 is the |
@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) 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. |
@Kaur-Parminder thanks for the info. I reopened the issue to look investigate if we can port the fix to .NET 6.0. |
Fixed through the PR #62155 |
Description
CultureInfo.GetCultureInfo(1035).TextInfo.ANSICodePage returns 0 for .Net6 and returns 1252 for .Net5.
Reproduction Steps
Run this code with .net 6
https://docs.microsoft.com/en-us/dotnet/api/system.globalization.cultureinfo?view=net-6.0#examples
Add myCItrad.TextInfo.ANSICodePage to code to see value.
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
The text was updated successfully, but these errors were encountered: