Skip to content

Commit

Permalink
Fix issue wth Turkish case-changing (see #675)
Browse files Browse the repository at this point in the history
  • Loading branch information
josephwright committed Mar 3, 2020
1 parent 940f548 commit 3de4c5f
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 9 deletions.
3 changes: 3 additions & 0 deletions l3kernel/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ this project uses date-based 'snapshot' version identifiers.

## [Unreleased]

### Fixed
- Issue with case-changing Turkish

## [2020-03-03]

### Added
Expand Down
18 changes: 9 additions & 9 deletions l3kernel/l3text-case.dtx
Original file line number Diff line number Diff line change
Expand Up @@ -1040,7 +1040,7 @@
%
% \begin{macro}[EXP]{\@@_change_case_lower_tr:nnnN}
% \begin{macro}[EXP]{\@@_change_case_lower_tr:nnNw}
% \begin{macro}[EXP]{\@@_change_case_lower_tr:nnN}
% \begin{macro}[EXP]{\@@_change_case_lower_tr:NnnN}
% \begin{macro}[EXP]{\@@_change_case_lower_tr:nnnNN}
% The Turkic languages need special treatment for dotted-i and dotless-i.
% The lower casing rule can be expressed in terms of searching first for
Expand Down Expand Up @@ -1074,28 +1074,28 @@
\cs_new:Npn \@@_change_case_lower_tr:nnNw #1#2#3#4 \q_recursion_stop
{
\tl_if_head_is_N_type:nTF {#4}
{ \@@_change_case_lower_tr:nnN }
{ \@@_change_case_lower_tr:NnnN #3 }
{
\@@_change_case_store:e
{ \char_generate:nn { "0131 } { \@@_char_catcode:N #3 } }
\@@_change_case_loop:nnw
}
{#1} {#2} #4 \q_recursion_stop
}
\cs_new:Npn \@@_change_case_lower_tr:nnN #1#2#3
\cs_new:Npn \@@_change_case_lower_tr:NnnN #1#2#3#4
{
\bool_lazy_or:nnTF
{ \token_if_cs_p:N #3 }
{ ! \int_compare_p:nNn { `#3 } = { "0307 } }
{ \token_if_cs_p:N #4 }
{ ! \int_compare_p:nNn { `#4 } = { "0307 } }
{
\@@_change_case_store:e
{ \char_generate:nn { "0131 } { \@@_char_catcode:N #3 } }
\@@_change_case_loop:nnw {#1} {#2} #3
{ \char_generate:nn { "0131 } { \@@_char_catcode:N #1 } }
\@@_change_case_loop:nnw {#2} {#3} #4
}
{
\@@_change_case_store:e
{ \char_generate:nn { "0069 } { \@@_char_catcode:N #3 } }
\@@_change_case_loop:nnw {#1} {#2}
{ \char_generate:nn { "0069 } { \@@_char_catcode:N #1 } }
\@@_change_case_loop:nnw {#2} {#3}
}
}
}
Expand Down

0 comments on commit 3de4c5f

Please sign in to comment.