Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions code/Meerkat.NameParser.Test/Meerkat.NameParser.Test.csproj
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net471</TargetFramework>
<RootNamespace>Meerkat.Test</RootNamespace>
Expand All @@ -7,9 +7,9 @@
<OutDir>$(OutputPath)</OutDir>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.8.0" />
<PackageReference Include="NUnit" Version="3.11.0" />
<PackageReference Include="NUnit3TestAdapter" Version="3.13.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.8.3" />
<PackageReference Include="NUnit" Version="3.13.0" />
<PackageReference Include="NUnit3TestAdapter" Version="3.17.0" />
</ItemGroup>
<ItemGroup>
<Compile Include="..\SolutionInfo.cs" Link="Properties\SolutionInfo.cs" />
Expand Down
6 changes: 6 additions & 0 deletions code/Meerkat.NameParser.Test/Party/Naming/PersonNameTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -283,6 +283,12 @@ public void ForenameTitleII()
ParseName("Richard The Lionheart", envelope: "Richard The Lionheart", title: "The Lionheart", forename: "Richard");
}

[Test]
public void NonAsciiCharacters()
{
ParseName("�iv�nd H��y", envelope: "�iv�nd H��y", forename: "�iv�nd", surname: "H��y");
}

private void ParseName(string value, string format = "", string envelope = "", string title = "", string forename = "", string prefix = "", string surname = "", string suffix = "")
{
var parser = format == "STF" ? ParserFactory.StandardPersonParser(true) : ParserFactory.StandardPersonParser();
Expand Down
8 changes: 4 additions & 4 deletions code/Meerkat.NameParser/Meerkat.NameParser.csproj
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>net452;net462;net471;net472;netstandard20</TargetFrameworks>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
Expand All @@ -19,9 +19,9 @@
<OutDir>$(OutputPath)</OutDir>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Meerkat.Logging" Version="2.2.1" />
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.0.0-beta2-18618-05" PrivateAssets="All"/>
<PackageReference Include="Newtonsoft.Json" Version="11.0.2" />
<PackageReference Include="Meerkat.Logging" Version="2.3.0" />
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.0.0" PrivateAssets="All" />
<PackageReference Include="Newtonsoft.Json" Version="12.0.3" />
</ItemGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
<DefineConstants>TRACE;DEBUG</DefineConstants>
Expand Down
6 changes: 4 additions & 2 deletions code/Meerkat.NameParser/Tools/LexExtensions.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using System.Linq;
using System.Globalization;
using System.Linq;

namespace Meerkat.Tools
{
Expand Down Expand Up @@ -31,7 +32,8 @@ public static bool IsDigit(this int value)

public static bool IsAlpha(this int value)
{
return value.InLexCharRange(LexChar.A, LexChar.Z) || value.InLexCharRange(LexChar.Alower, LexChar.Zlower);
var category = CharUnicodeInfo.GetUnicodeCategory((char)value);
return category == UnicodeCategory.LowercaseLetter || category == UnicodeCategory.UppercaseLetter;
}

public static bool IsAlphaNumeric(this int value)
Expand Down