From ca0a1c0e64e332a93ef87d034b8fe12a832eb91e Mon Sep 17 00:00:00 2001 From: "Steven G. Johnson" Date: Sat, 4 Nov 2023 17:20:02 -0400 Subject: [PATCH 1/2] fix Unicode.julia_chartransform for Julia 1.10 --- base/strings/unicode.jl | 1 + 1 file changed, 1 insertion(+) diff --git a/base/strings/unicode.jl b/base/strings/unicode.jl index 17c5d66c160b6..2e04633b87487 100644 --- a/base/strings/unicode.jl +++ b/base/strings/unicode.jl @@ -179,6 +179,7 @@ const _julia_charmap = Dict{UInt32,UInt32}( 0x00B7 => 0x22C5, 0x0387 => 0x22C5, 0x2212 => 0x002D, + 0x210F => 0x0127, ) utf8proc_map(s::AbstractString, flags::Integer, chartransform=identity) = utf8proc_map(String(s), flags, chartransform) From 40f28b274ed8286585caef29ccb7221ea28869ad Mon Sep 17 00:00:00 2001 From: "Steven G. Johnson" Date: Sat, 4 Nov 2023 17:23:05 -0400 Subject: [PATCH 2/2] add a test --- stdlib/Unicode/test/runtests.jl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/stdlib/Unicode/test/runtests.jl b/stdlib/Unicode/test/runtests.jl index 5c5a75b33e363..573d5da6167ba 100644 --- a/stdlib/Unicode/test/runtests.jl +++ b/stdlib/Unicode/test/runtests.jl @@ -27,8 +27,8 @@ using Unicode: normalize, isassigned, julia_chartransform @test normalize("\u0072\u0307\u0323", :NFC) == "\u1E5B\u0307" #26917 # julia_chartransform identifier normalization - @test normalize("julia\u025B\u00B5\u00B7\u0387\u2212", chartransform=julia_chartransform) == - "julia\u03B5\u03BC\u22C5\u22C5\u002D" + @test normalize("julia\u025B\u00B5\u00B7\u0387\u2212\u210F", chartransform=julia_chartransform) == + "julia\u03B5\u03BC\u22C5\u22C5\u002D\u0127" @test julia_chartransform('\u00B5') === '\u03BC' end