-
Notifications
You must be signed in to change notification settings - Fork 525
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
RequestBuilder.BuildUri() returns broken Uri on Thai cultureinfo #2542
Comments
We are discussing this internally. For now I've marked this issue as a question as there's really not a bug in libraries. If anything we'll be applying a workaround for a bug in .NET Core 3.1. Do you have a reference to an issue in .NET Core 3.1 that we can look at? Our main worry is that if we work around the forward slash comparison, what else can we find down the road that is also not properly handled with Thai culture by .NET? |
Sure. The below link shows there are behavior differences among .NET versions and how to deal with it from .NET developer perspective. My original post concerns only my circumstances which is .NET 3.1 + Linux with
Also there is an internal discussion about it since 2020 but not yet concluded. So, some of .NET components like MAUI landed PR like this. |
@HJLeee we have released v1.62.1 of the support libraries: Google.Apis.Core, Google.Apis, Google.Apis.Auth, Google.Apis.Auth.AspNetCore3 with the workaround in #2542. Please make certain you add explicit references to these packages. I'll be closing this issue now as I believe there's nothing else we can do here, but do leave a comment if you believe otherwise. |
#2546 looks good. I appreciate for your fast PR landing and release. :) |
Hello. One of my clients has reported a bug that occurs only in certain settings.
Environment details
Steps to reproduce
This is due to a bug in .NET Core 3.1 inappropriately handling Thai language and luckly it is fixed in .NET 5.
As the sample code shows, it needs to add
StringComparison.OrdinalIgnoreCase
option tostring.StartsWith()
to work around the bug.google-api-dotnet-client/Src/Support/Google.Apis.Core/Requests/RequestBuilder.cs
Line 126 in c6c7e6e
I found that .NET runtime code also uses
StringComparison.OrdinalIgnoreCase
internally for Uri handling.https://github.com/dotnet/runtime/blob/9cbad65fe68bc518fee67f7d75056ea0651e6221/src/libraries/System.Private.Uri/src/System/Uri.cs#L1915
Thank you.
The text was updated successfully, but these errors were encountered: