Skip to content

Commit

Permalink
Fixing NET462 incorrect uppecase for specific characters.
Browse files Browse the repository at this point in the history
  • Loading branch information
lmerino4d committed Dec 27, 2023
1 parent 476335e commit 3f11c01
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions Jint/Native/String/StringPrototype.cs
Original file line number Diff line number Diff line change
Expand Up @@ -248,6 +248,13 @@ private JsValue ToLocaleUpperCase(JsValue thisObject, JsValue[] arguments)
if (string.Equals("lt", culture.Name, StringComparison.OrdinalIgnoreCase))
{
s = StringInlHelper.LithuanianStringProcessor(s);
#if NET462
// Code specific to .NET Framework 4.6.2.
// For no good reason this verison does not upper case these characters correctly.
return new JsString(s.ToUpper(culture)
.Replace("ϳ", "Ϳ")
.Replace("ʝ", "Ʝ"));
#endif
}

return new JsString(s.ToUpper(culture));
Expand Down

0 comments on commit 3f11c01

Please sign in to comment.