Branch: refs/heads/smoke-me/khw-locale4
Home: https://github.com/Perl/perl5
Commit: 7e1fcaad74e2e5a74e9a7bc94ed8faffb506302f
https://github.com/Perl/perl5/commit/7e1fcaad74e2e5a74e9a7bc94ed8faffb506302f
Author: Karl Williamson <[email protected]>
Date: 2022-08-13 (Sat, 13 Aug 2022)
Changed paths:
M t/loc_tools.pl
Log Message:
-----------
loc_tools: Create function, refactor
category_excluded() is a better name for what the current name
'is_category_valid" does. And it turns out that we need to use this
function on (those few) systems that don't have LC_CTYPE to avoid
executing code that depends on LC_CTYPE.
And we do need an improved is_category_valid() for other checks.
Commit: 11e127d7b92699aa2d2fe721a140e647f2749a5c
https://github.com/Perl/perl5/commit/11e127d7b92699aa2d2fe721a140e647f2749a5c
Author: Karl Williamson <[email protected]>
Date: 2022-08-13 (Sat, 13 Aug 2022)
Changed paths:
M t/loc_tools.pl
Log Message:
-----------
loc_tools.pl: Move code in file
This is for future commits to call after it is defined
Commit: 3cb2ac54816b9527822a3844cf1ec68cec4b2091
https://github.com/Perl/perl5/commit/3cb2ac54816b9527822a3844cf1ec68cec4b2091
Author: Karl Williamson <[email protected]>
Date: 2022-08-13 (Sat, 13 Aug 2022)
Changed paths:
M t/loc_tools.pl
Log Message:
-----------
t/loc_tools.pl: Print better failing test numbers
This test module is 'required' from other perl test files. If it
encounters an error, it doesn't know how to report it. What it does is
call fail() if available, and a home-grown one otherwise. Prior to this
commit the home-grown version just made all tests number 0. This commit
changes that to make them sequentially numbered from a very high
starting one, so as not to interfere with the outer calls.
Commit: 4c04e752f0d4f361ab92fe0f60b837eefc77e1f0
https://github.com/Perl/perl5/commit/4c04e752f0d4f361ab92fe0f60b837eefc77e1f0
Author: Karl Williamson <[email protected]>
Date: 2022-08-13 (Sat, 13 Aug 2022)
Changed paths:
M t/loc_tools.pl
Log Message:
-----------
t/loc_tools.pl: Refactor _trylocale()
This function is used to see if a locale actually works on the current
platform. I was not fully aware of the glitches if a category is in one
locale, and LC_CTYPE is in another. This makes sure they are both the
same; and this results in some simplification.
Commit: a15adee0e9693f859094600df170a12632259c7d
https://github.com/Perl/perl5/commit/a15adee0e9693f859094600df170a12632259c7d
Author: Karl Williamson <[email protected]>
Date: 2022-08-13 (Sat, 13 Aug 2022)
Changed paths:
M t/loc_tools.pl
Log Message:
-----------
t/loc_tools.pl: Fail earlier
Move the code that returns failure into the loop, so won't keep
iterating if failure is going to happen anyway.
Commit: 233fdc28ac6f2e9d9bdf68b2c429671cdb21f434
https://github.com/Perl/perl5/commit/233fdc28ac6f2e9d9bdf68b2c429671cdb21f434
Author: Karl Williamson <[email protected]>
Date: 2022-08-13 (Sat, 13 Aug 2022)
Changed paths:
M t/loc_tools.pl
Log Message:
-----------
t/loc_tools.pl: Add checks
This verifies that we can restore a locale that we were previously in,
and makes sure that we don't stay in a locale that doesn't work well.
Doing so has led to crashes.
Commit: 3cdd0fa007431c6fe5a34b530ec0c847213972cc
https://github.com/Perl/perl5/commit/3cdd0fa007431c6fe5a34b530ec0c847213972cc
Author: Karl Williamson <[email protected]>
Date: 2022-08-13 (Sat, 13 Aug 2022)
Changed paths:
M t/loc_tools.pl
Log Message:
-----------
t/loc_tools.pl: Don't allow commas in locale names
This was a problem in some buggy Windows versions. This addition keeps
locales with this bug from being tested.
Commit: ed80c7f6b20478c37d4e119919697a398b16b40c
https://github.com/Perl/perl5/commit/ed80c7f6b20478c37d4e119919697a398b16b40c
Author: Karl Williamson <[email protected]>
Date: 2022-08-13 (Sat, 13 Aug 2022)
Changed paths:
M t/loc_tools.pl
Log Message:
-----------
t/loc_tools.pl: Check for unsupported locales
This commit causes us not to view unsupported locales as legitimate for
testing. Core dumps occurred on some platforms without this.
It looks for a diagnostic that the next commit in this series will
generate.
Commit: 46b772c8afaa088a6db5f89dce48c5ef50313796
https://github.com/Perl/perl5/commit/46b772c8afaa088a6db5f89dce48c5ef50313796
Author: Karl Williamson <[email protected]>
Date: 2022-08-13 (Sat, 13 Aug 2022)
Changed paths:
M t/loc_tools.pl
Log Message:
-----------
t/loc_tools.pl: White-space only
Commit: 7bdac92642a05df837ffd2357dd3e8eff9e47584
https://github.com/Perl/perl5/commit/7bdac92642a05df837ffd2357dd3e8eff9e47584
Author: Karl Williamson <[email protected]>
Date: 2022-08-13 (Sat, 13 Aug 2022)
Changed paths:
M t/loc_tools.pl
Log Message:
-----------
t/loc_tools.pl: Turn off warnings in a timely manner
It doesn't matter much, but some warnings might be output by doing the
'use locale' before turning off warnings.
Commit: 4b1fbda84b8a2236aaf81b18fa207ba6a4808cea
https://github.com/Perl/perl5/commit/4b1fbda84b8a2236aaf81b18fa207ba6a4808cea
Author: Karl Williamson <[email protected]>
Date: 2022-08-13 (Sat, 13 Aug 2022)
Changed paths:
M perl.c
Log Message:
-----------
XXX msg: perl.c: Rm redundant initialization of PL_C_locale_obj
This
Commit: 2579696e7ff8742696a3ff1f82890712f4be1441
https://github.com/Perl/perl5/commit/2579696e7ff8742696a3ff1f82890712f4be1441
Author: Karl Williamson <[email protected]>
Date: 2022-08-13 (Sat, 13 Aug 2022)
Changed paths:
M embed.fnc
M embed.h
M locale.c
M proto.h
Log Message:
-----------
locale.c: querylocale return mortalized copy
It is too easy to forget to savepv() the return of these macros, leading
to hard-to-diagnose bugs. Head those off at the pass by always making a
copy that gets freed by the system.
Commit: 689b0dd348b22db8537eae7474035e64337e4631
https://github.com/Perl/perl5/commit/689b0dd348b22db8537eae7474035e64337e4631
Author: Karl Williamson <[email protected]>
Date: 2022-08-13 (Sat, 13 Aug 2022)
Changed paths:
M locale.c
Log Message:
-----------
locale.c: Refactor a strerror implementation
The previous commit made it clear to me that this implementation of
strerror() could be simplified. (There are several implementations
depending on what libc functions are available on the platform.)
Commit: cd1ed90fd13cf4f0195c9a007777dd39f558de2e
https://github.com/Perl/perl5/commit/cd1ed90fd13cf4f0195c9a007777dd39f558de2e
Author: Karl Williamson <[email protected]>
Date: 2022-08-13 (Sat, 13 Aug 2022)
Changed paths:
M locale.c
Log Message:
-----------
Initialize PL_numeric_name, PL_collation_name
Having these initialized to the C locale aoids some otherwise required
conditionals.
Commit: ff748ecdf7ee9c4f64440cebe97b4938338a11b2
https://github.com/Perl/perl5/commit/ff748ecdf7ee9c4f64440cebe97b4938338a11b2
Author: Karl Williamson <[email protected]>
Date: 2022-08-13 (Sat, 13 Aug 2022)
Changed paths:
M locale.c
Log Message:
-----------
locale.c: Silence some compiler warnings if no LC_ALL
Commit: a49a3c9e0fe91592251b88dbbdf09e5405e98365
https://github.com/Perl/perl5/commit/a49a3c9e0fe91592251b88dbbdf09e5405e98365
Author: Karl Williamson <[email protected]>
Date: 2022-08-13 (Sat, 13 Aug 2022)
Changed paths:
M locale.c
Log Message:
-----------
locale.c: Don't change locale if already there
Changing the locale is cheap for some categories, but expensive for
others. Changing LC_COLLATE is most expensive, requiring recalculation
of the collation transformation mapping.
This commit checks that we aren't already in the desired locale before
changing locales. and does nothing if no change is needed.
Commit: 8e017ac01155f3da607be17755a9c51e07b19e9d
https://github.com/Perl/perl5/commit/8e017ac01155f3da607be17755a9c51e07b19e9d
Author: Karl Williamson <[email protected]>
Date: 2022-08-13 (Sat, 13 Aug 2022)
Changed paths:
M embed.fnc
M embed.h
M locale.c
M proto.h
Log Message:
-----------
locale.c: Separate out two Win fcns from a larger one
This makes the larger one easier to understand, and prepares for
possible independent calls to the two, which are potentially useful on
their own.
Commit: b7a9aa91abedb9f7bb0cabfc232706e807ea7794
https://github.com/Perl/perl5/commit/b7a9aa91abedb9f7bb0cabfc232706e807ea7794
Author: Karl Williamson <[email protected]>
Date: 2022-08-13 (Sat, 13 Aug 2022)
Changed paths:
M embed.fnc
M embed.h
M ext/POSIX/POSIX.xs
M locale.c
M proto.h
Log Message:
-----------
Move code for mbr?towc() from POSIX.xs to locale.c
This avoids duplicated logic.
Commit: c7e04edede488ccfee42571f7785eba43b796e2f
https://github.com/Perl/perl5/commit/c7e04edede488ccfee42571f7785eba43b796e2f
Author: Karl Williamson <[email protected]>
Date: 2022-08-13 (Sat, 13 Aug 2022)
Changed paths:
M locale.c
Log Message:
-----------
locale.c: Mollify clang
It claims this could be used uninitialized. I don't think it can.
Commit: df6e83cb898fda1637e58b11bcfe38adeaef5a85
https://github.com/Perl/perl5/commit/df6e83cb898fda1637e58b11bcfe38adeaef5a85
Author: Karl Williamson <[email protected]>
Date: 2022-08-13 (Sat, 13 Aug 2022)
Changed paths:
M locale.c
Log Message:
-----------
locale.c: Reorder cases in a switch
This moves handling the CODESET to the end, as future commits will make
its handling more complicated. The cases are now ordered so the
simplest (based on the direction of future commits) are first
Commit: 7a352f335e9214e82e714417f160d6e93d22bcff
https://github.com/Perl/perl5/commit/7a352f335e9214e82e714417f160d6e93d22bcff
Author: Karl Williamson <[email protected]>
Date: 2022-08-13 (Sat, 13 Aug 2022)
Changed paths:
M locale.c
Log Message:
-----------
locale.c: Make statics of repeated string constants
These strings are (or soon will be) used in multiple places; so have
just one definition for them.
Commit: a7757808374cb0bbd1666efd7bafc4591d7ad338
https://github.com/Perl/perl5/commit/a7757808374cb0bbd1666efd7bafc4591d7ad338
Author: Karl Williamson <[email protected]>
Date: 2022-08-13 (Sat, 13 Aug 2022)
Changed paths:
M locale.c
Log Message:
-----------
locale.c: Add two #defines
This makes sure that we handle having any variant of nl_langinfo() or
localeconv().
Commit: a9094775c8b36682d77fba2a0e3c26e5c4f28c6a
https://github.com/Perl/perl5/commit/a9094775c8b36682d77fba2a0e3c26e5c4f28c6a
Author: Karl Williamson <[email protected]>
Date: 2022-08-13 (Sat, 13 Aug 2022)
Changed paths:
M embed.fnc
M embed.h
M locale.c
M proto.h
Log Message:
-----------
locale.c: Return defaults for uncomputable langinfo items
Return the values from the C locale for nl_langinfo() items that aren't
computable on this platform. If the platform has nl_langinfo(), then
all of them are computable, but if not, some can't be computed, and
others can be, but only if there are alternative methods available on
the platform.
As part of this commit, S_my_nl_langinfo() and S_save_to_buffer() are no
longer used when USE_LOCALE is not defined, so don't compile them.
Commit: 410472d5bf7fe94e800fff27e4915ab2781f717a
https://github.com/Perl/perl5/commit/410472d5bf7fe94e800fff27e4915ab2781f717a
Author: Karl Williamson <[email protected]>
Date: 2022-08-13 (Sat, 13 Aug 2022)
Changed paths:
M locale.c
Log Message:
-----------
locale.c: Rmv reimplementation of my_strftime()
Prior to this commit, there was a near duplicate copy of the code from
util.c that implements my_strftime(). This was done because the util.c
version zaps the wday field, which made it incompatible.
But it dawned on me that if the arbitrary date we use to do our
calculations were such that it was for a year in which the wday field
gets zapped to the value we want it to be, then the util.c version
automatically works. This happens in years when January 1 falls on a
Sunday.
Commit: 4f29fd10d5b1017e6399b73f10f9146dded81055
https://github.com/Perl/perl5/commit/4f29fd10d5b1017e6399b73f10f9146dded81055
Author: Karl Williamson <[email protected]>
Date: 2022-08-13 (Sat, 13 Aug 2022)
Changed paths:
M locale.c
Log Message:
-----------
locale.c: White-space only
Align with previous commit and properly indent some preprocessor
directives
Commit: a9aa3d9b841fc772dc03d00519b5d540239957ae
https://github.com/Perl/perl5/commit/a9aa3d9b841fc772dc03d00519b5d540239957ae
Author: Karl Williamson <[email protected]>
Date: 2022-08-13 (Sat, 13 Aug 2022)
Changed paths:
M embed.fnc
M embed.h
M locale.c
M proto.h
Log Message:
-----------
locale.c: Shorten static function name
The extra syllable(s) are unnecessary noise
Commit: d94d9872f3b6514da15ba8215b0ed85172fe01c4
https://github.com/Perl/perl5/commit/d94d9872f3b6514da15ba8215b0ed85172fe01c4
Author: Karl Williamson <[email protected]>
Date: 2022-08-13 (Sat, 13 Aug 2022)
Changed paths:
M embed.fnc
M locale.c
M proto.h
Log Message:
-----------
locale.c: Extend a static function
This will allow it to be used in situations where the buffer it controls
is single use, and we don't need to keep track of the size for future
calls.
Commit: adff140bb720b93aec3fed06aa4706fe6b71926d
https://github.com/Perl/perl5/commit/adff140bb720b93aec3fed06aa4706fe6b71926d
Author: Karl Williamson <[email protected]>
Date: 2022-08-13 (Sat, 13 Aug 2022)
Changed paths:
M locale.c
Log Message:
-----------
locale.c: Use typedef to simplify
This allows some preprocessor conditionals to be removed
Commit: 479d0269ec77e8081847f227d43ce83a837ed032
https://github.com/Perl/perl5/commit/479d0269ec77e8081847f227d43ce83a837ed032
Author: Karl Williamson <[email protected]>
Date: 2022-08-13 (Sat, 13 Aug 2022)
Changed paths:
M locale.c
Log Message:
-----------
locale.c: Rmv redundant cBOOL()
strEQ and && already return booleans
Commit: df97ad64f4c3b80421e5b64f9c3e170fd536d7ad
https://github.com/Perl/perl5/commit/df97ad64f4c3b80421e5b64f9c3e170fd536d7ad
Author: Karl Williamson <[email protected]>
Date: 2022-08-13 (Sat, 13 Aug 2022)
Changed paths:
M locale.c
Log Message:
-----------
locale.c: Fix currency symbol derivation
On platforms without nl_langinfo(), we derive the currency symbol from
localeconv(). The symbol must be tweaked to conform to nl_langinfo()
standards. Prior to this commit, it guessed at how to tweak a rare
circumstance. I found evidence this guess was wrong, so looked around,
and copied the way cygwin does it.
This also no longer returns just an empty string in certain cases.
nl_langinfo() itself doesn't, so conform to that.
Commit: 6a6667c04b1196c33f7b06780e12ecabf8bdeed3
https://github.com/Perl/perl5/commit/6a6667c04b1196c33f7b06780e12ecabf8bdeed3
Author: Karl Williamson <[email protected]>
Date: 2022-08-13 (Sat, 13 Aug 2022)
Changed paths:
M locale.c
Log Message:
-----------
locale.c: Don't add CP to Windows code page names
The actual name appears to be just the number for purposes of
nl_langinfo()-ish things.
Commit: ffe707ca7d3e97d20493f65deeb0353771b93f65
https://github.com/Perl/perl5/commit/ffe707ca7d3e97d20493f65deeb0353771b93f65
Author: Karl Williamson <[email protected]>
Date: 2022-08-13 (Sat, 13 Aug 2022)
Changed paths:
M embed.fnc
M locale.c
M proto.h
Log Message:
-----------
locale.c: Don't ask a static fcn to be inlined
It's too complicated to really be inlined, and the compiler can figure
things out itself given it is a static function
Commit: 2384ac9fc5df300c1eb70cdbeecadb87a8fd82b4
https://github.com/Perl/perl5/commit/2384ac9fc5df300c1eb70cdbeecadb87a8fd82b4
Author: Karl Williamson <[email protected]>
Date: 2022-08-13 (Sat, 13 Aug 2022)
Changed paths:
M embed.fnc
M proto.h
Log Message:
-----------
S_save_to_buffer() allow ignoring return value
Future commits will want to use this, while discarding the return value.
Commit: ce6d2cd6ae41dd27b03af471a3605ab42385d965
https://github.com/Perl/perl5/commit/ce6d2cd6ae41dd27b03af471a3605ab42385d965
Author: Karl Williamson <[email protected]>
Date: 2022-08-13 (Sat, 13 Aug 2022)
Changed paths:
M embed.fnc
M locale.c
M proto.h
Log Message:
-----------
locale.c: Rmv no longer used param from static fnc
Previous commits have gotten rid of this parameter to S_save_to_buffer
Commit: c8027858ed41e61e2ab20320a3dbc8aa8f35d699
https://github.com/Perl/perl5/commit/c8027858ed41e61e2ab20320a3dbc8aa8f35d699
Author: Karl Williamson <[email protected]>
Date: 2022-08-13 (Sat, 13 Aug 2022)
Changed paths:
M locale.c
Log Message:
-----------
locale.c: Don't read off buffer end
In some configurations, under the exact set of input it would have been
possible to read past the buffer end. This commit adds a conditional to
prevent that.
Commit: b6a88a28a8d0e5f18d1dc13cb51942c4e7625e08
https://github.com/Perl/perl5/commit/b6a88a28a8d0e5f18d1dc13cb51942c4e7625e08
Author: Karl Williamson <[email protected]>
Date: 2022-08-13 (Sat, 13 Aug 2022)
Changed paths:
M locale.c
Log Message:
-----------
locale.c: Fix Windows bug with broken localeconv()
localeconv() was broken on Windows until VS 2015. As a workaround, this
was using my_snprintf() to find what the decimal point character is,
trying to avoid our workaround for localeconv(), which has a (slight)
chance of a race condition.
The problem is that my_snprintf() might not end up calling snprintf at
all; I didn't trace all possibilities in Windows. So it doesn't make
for a reliable sentinel.
This commit now specifically uses libc snprintf(), and if it fails, drops
down to try localeconv().
It also changes things so that if localeconv() is not present at all or
usable on the platform, to use this snprintf method.
Commit: e4314ce239ba83c3b82ed0f977fd0829dcdd524b
https://github.com/Perl/perl5/commit/e4314ce239ba83c3b82ed0f977fd0829dcdd524b
Author: Karl Williamson <[email protected]>
Date: 2022-08-13 (Sat, 13 Aug 2022)
Changed paths:
M locale.c
Log Message:
-----------
locale.c: Use a scratch buf; instead of reusing old
This is in preparation for the next commit
Commit: f9bdf4aa154454fd370dc169d39e3e4bbaa32a48
https://github.com/Perl/perl5/commit/f9bdf4aa154454fd370dc169d39e3e4bbaa32a48
Author: Karl Williamson <[email protected]>
Date: 2022-08-13 (Sat, 13 Aug 2022)
Changed paths:
M intrpvar.h
M locale.c
Log Message:
-----------
locale: make PL_langinfo_buf const *
The previous commit allows this change to be made.
Commit: c1b7fc9aaa7d2c9039f267fa5d58e270f3276831
https://github.com/Perl/perl5/commit/c1b7fc9aaa7d2c9039f267fa5d58e270f3276831
Author: Karl Williamson <[email protected]>
Date: 2022-08-13 (Sat, 13 Aug 2022)
Changed paths:
M embed.fnc
M embed.h
M proto.h
Log Message:
-----------
embed.fnc: Also check for NL_LANGINFO_L
The preprocessor directives were only flooking for plain nl_langinfo().
It's quite unlikely that a platform will have the '_l' version without
also having the plain one. But this makes sure.
Commit: 8ca164d42f01769232a4f76b5ee0a541b751a92b
https://github.com/Perl/perl5/commit/8ca164d42f01769232a4f76b5ee0a541b751a92b
Author: Karl Williamson <[email protected]>
Date: 2022-08-13 (Sat, 13 Aug 2022)
Changed paths:
M embed.fnc
M embed.h
M locale.c
M proto.h
Log Message:
-----------
locale.c: Make static fcn reentrant
This makes my_langinfo() reentrant by adding parameters specifying where
to store the result.
This prepares for future commits, and fixes some minor bugs for XS
writers, in that the claim was that the buffer in calling
Perl_langinfo() was safe from getting zapped until the next call to it
in the same thread. It turns out there were cases where, because of
internal calls, the buffer did get zapped.
Commit: 62af2f52a3262b5fa17264a0effe7cb1015af1e1
https://github.com/Perl/perl5/commit/62af2f52a3262b5fa17264a0effe7cb1015af1e1
Author: Karl Williamson <[email protected]>
Date: 2022-08-13 (Sat, 13 Aug 2022)
Changed paths:
M locale.c
Log Message:
-----------
locale.c: langinfo: Use Windows fcn to find CODESET
There is a Windows function, available for quite a long time, that will
return the current code page. Use this for the nl_langinfo() CODESET,
as that libc function isn't implemented on Windows.
Commit: 58c46f541a7ca09d7bd98f67b5617daf26aa79e3
https://github.com/Perl/perl5/commit/58c46f541a7ca09d7bd98f67b5617daf26aa79e3
Author: Karl Williamson <[email protected]>
Date: 2022-08-13 (Sat, 13 Aug 2022)
Changed paths:
M embed.fnc
M embed.h
M locale.c
M proto.h
Log Message:
-----------
locale.c: Add static fcn to analyze locale name codeset
It determines if the name indicates it is UTF-8 or not. There are
several variant spellings in use, and this hides that from the the
callers.
It won't be actually used until the next commit
Commit: 70c9fb06da6f21f8d51dc36467797ea594809d1b
https://github.com/Perl/perl5/commit/70c9fb06da6f21f8d51dc36467797ea594809d1b
Author: Karl Williamson <[email protected]>
Date: 2022-08-13 (Sat, 13 Aug 2022)
Changed paths:
M ext/I18N-Langinfo/Langinfo.pm
M locale.c
Log Message:
-----------
locale.c: Improve non-nl_langinfo() CODESET calc
Prior to this commit, on non-Windows platforms that don't have a
nl_langinfo() libc function, the code completely punted computation of
the CODESET item. I have not been able to figure out how to do this,
even going to the locale definition files on disk (which may vary
anyway), but we can do a lot better than punting.
This commit adds three checks:
1) If the locale name is C or POSIX, we know the codeset
2) We can detect if a locale is UTF-8. If it is, that is the codeset.
Many modern locales are of this ilk.
3) Failing that, some locales have the codeset appear in the name,
following a dot.
It isn't perfect, but it's a lot better than completely punting.
Commit: 3666a4531acc454e5eab68ecce242b635449881c
https://github.com/Perl/perl5/commit/3666a4531acc454e5eab68ecce242b635449881c
Author: Karl Williamson <[email protected]>
Date: 2022-08-13 (Sat, 13 Aug 2022)
Changed paths:
M embed.fnc
M locale.c
M proto.h
Log Message:
-----------
Add toggle_locale() fcns
These are designed to temporarily switch the locale for a cateogry
around some operation that needs it to be different than the current
one. They will be used in the next commit.
These will eventually replace the more unwieldy
_is_cur_LC_category_utf8() function, which toggles as a side effect
Commit: 6ffc119a6c61446fe5cd43ba954049f77b2a30c5
https://github.com/Perl/perl5/commit/6ffc119a6c61446fe5cd43ba954049f77b2a30c5
Author: Karl Williamson <[email protected]>
Date: 2022-08-13 (Sat, 13 Aug 2022)
Changed paths:
M embed.fnc
M embed.h
M locale.c
M proto.h
Log Message:
-----------
New signature for static fcn my_langinfo()
This commit changes the calling sequence for my_langinfo to add the
desired locale, and the locale category of the desired item.
This allows the function to be able to return the desired value for any
locale, avoiding some locale changes that would happen until this
commit, and hiding the need for locale changes from outside functions,
though a couple continue to do so to avoid potential multiple changes.
Commit: 13ac9e9792ca1260310b4d818a29298909746291
https://github.com/Perl/perl5/commit/13ac9e9792ca1260310b4d818a29298909746291
Author: Karl Williamson <[email protected]>
Date: 2022-08-13 (Sat, 13 Aug 2022)
Changed paths:
M locale.c
Log Message:
-----------
locale.: Need CTYPE to match other category for nl_langinfo
nl_langinfo knows about various components of locales that are supposed
to be defined for every locale, such as a string for a Yes/No response
or the name of a month in a particular language. These are associated
with various locale categories. In the examples cited, the month names
are in the LC_TIME category, and the responses in the LC_MESSAGES one.
But (perhaps because these are text strings), some platforms require the
LC_CTYPE locale to be the same as the other locale. cygwin is an
example. Rather than try to figure out which platform require this, and
which do not, it is a simple matter to just LC_CTYPE at the same time as
the other category
Commit: 8755e0ead673b675e0f42f60e46c134d5bbaa4d8
https://github.com/Perl/perl5/commit/8755e0ead673b675e0f42f60e46c134d5bbaa4d8
Author: Karl Williamson <[email protected]>
Date: 2022-08-13 (Sat, 13 Aug 2022)
Changed paths:
M embed.fnc
M embed.h
M locale.c
M proto.h
Log Message:
-----------
locale.c: Add is_locale_utf8()
Previous commits have added the infrastructure to be able to determine
if a locale is UTF-8. This will prove useful, and this commit adds
a function to encapsulate this information, and uses it in a couple of
places, with more to come in future commits.
This uses as a final fallback, mbtowc(), supposed to be available in
C99. Future commits will add heuristics when that function isn't
available or is known to be unreliable on a particular system.
Commit: de1c50b64bcde99e12936125f0ec51a458205b41
https://github.com/Perl/perl5/commit/de1c50b64bcde99e12936125f0ec51a458205b41
Author: Karl Williamson <[email protected]>
Date: 2022-08-13 (Sat, 13 Aug 2022)
Changed paths:
M perl.h
M utf8.h
Log Message:
-----------
utf8ness
Commit: 85b84098940639651e5c530c4d49ba580825ae8d
https://github.com/Perl/perl5/commit/85b84098940639651e5c530c4d49ba580825ae8d
Author: Karl Williamson <[email protected]>
Date: 2022-08-13 (Sat, 13 Aug 2022)
Changed paths:
M embed.fnc
M embed.h
M locale.c
M proto.h
Log Message:
-----------
locale.c: Add fcn for UTF8ness determination
get_locale_string_utf8ness_i() will determine if the string it is passed
in the locale it is passed is to be treated as UTF-8, or not.
Commit: 02060e2e5a40a50daca0c0fb22f89fdb74b1a96e
https://github.com/Perl/perl5/commit/02060e2e5a40a50daca0c0fb22f89fdb74b1a96e
Author: Karl Williamson <[email protected]>
Date: 2022-08-13 (Sat, 13 Aug 2022)
Changed paths:
M embed.fnc
M embed.h
M ext/POSIX/POSIX.xs
M locale.c
M proto.h
Log Message:
-----------
XXX perldelta Move POSIX::localeconv() logic to locale.c
The code currently in POSIX.xs is moved to locale.c, and reworked some
to fit in that scheme, and the logic for the workaround for the Windows
broken localeconv() is made more robust.
This is in preparation for the next commit which will use this logic
instead of (imperfectly) duplicating it.
This also creates Perl_localeconv() for direct XS calls of this
functionality.
Commit: 238cd661f08488a8cf24a5fb0d32e13ed17bf565
https://github.com/Perl/perl5/commit/238cd661f08488a8cf24a5fb0d32e13ed17bf565
Author: Karl Williamson <[email protected]>
Date: 2022-08-13 (Sat, 13 Aug 2022)
Changed paths:
M locale.c
Log Message:
-----------
locale.c: localeconv() unconditional NUMERIC toggle
It is possible to lockout changing the LC_NUMERIC locale. This is done
in some printf cases where a recursive call could get the radix
character wrong. But localeconv(), which could be called during this
recursion on some platforms, toggles the locale briefly, without
affecting the surrounding calls; so it can do the toggle
unconditionally.
The previous commit merely moved the functionality of localeconv() from
POSIX.xs to locale.c. This commit expands upon that.
Commit: b1f164edc7008e38128f9366ed08e35e0aa303b6
https://github.com/Perl/perl5/commit/b1f164edc7008e38128f9366ed08e35e0aa303b6
Author: Karl Williamson <[email protected]>
Date: 2022-08-13 (Sat, 13 Aug 2022)
Changed paths:
M embed.fnc
M embed.h
M locale.c
M proto.h
Log Message:
-----------
locale.c: Collapse duplicate logic into one instance
A previous commit move the logic for localeconv() into locale.c. This
commit takes advantage of that to use it instead of repeating the logic.
Notably, this commit removes the inconsistent duplicate logic that had
been used to deal with the Windows broken localeconv() bug.
Commit: 8563adc9f8c5280ccd2111ea41fc84ebc0dd0a12
https://github.com/Perl/perl5/commit/8563adc9f8c5280ccd2111ea41fc84ebc0dd0a12
Author: Karl Williamson <[email protected]>
Date: 2022-08-13 (Sat, 13 Aug 2022)
Changed paths:
M locale.c
Log Message:
-----------
locale.c: Add branch prediction, comments
Commit: 8a10d7da4ff3d511527cba0c56fc01524c518ea5
https://github.com/Perl/perl5/commit/8a10d7da4ff3d511527cba0c56fc01524c518ea5
Author: Karl Williamson <[email protected]>
Date: 2022-08-13 (Sat, 13 Aug 2022)
Changed paths:
M embed.fnc
M embed.h
M ext/POSIX/POSIX.xs
M locale.c
M proto.h
Log Message:
-----------
XXXdelta Add my_strftime8()
This is like plain my_strftime(), but additionally returns an indication
of the UTF-8ness of the returned string
Commit: 7cbec11b4bcbbe9d757f67fe38702292c575097c
https://github.com/Perl/perl5/commit/7cbec11b4bcbbe9d757f67fe38702292c575097c
Author: Karl Williamson <[email protected]>
Date: 2022-08-13 (Sat, 13 Aug 2022)
Changed paths:
M embed.fnc
M embed.h
M locale.c
M proto.h
Log Message:
-----------
locale.c: Add utf8ness return param to static fcn
my_langinfo_i() now will additionally return the UTF-8ness of the
returned string.
Commit: fdeeecedebd45174306966f3cbb4490fcfd6e27c
https://github.com/Perl/perl5/commit/fdeeecedebd45174306966f3cbb4490fcfd6e27c
Author: Karl Williamson <[email protected]>
Date: 2022-08-13 (Sat, 13 Aug 2022)
Changed paths:
M embed.fnc
M ext/I18N-Langinfo/Langinfo.xs
M locale.c
M proto.h
Log Message:
-----------
XXXdelta Add Perl_langinfo8()
This is like Perl_langinfo() but additionally returns information about
the UTF-8ness of the returned string.
Commit: 233b9874f1642981f4514cd0e75e3acca0ff78f0
https://github.com/Perl/perl5/commit/233b9874f1642981f4514cd0e75e3acca0ff78f0
Author: Karl Williamson <[email protected]>
Date: 2022-08-13 (Sat, 13 Aug 2022)
Changed paths:
M lib/locale.t
Log Message:
-----------
lib/locale.t: Use I18N::Langinfo, not POSIX::localeconv()
Now that Langinfo is ported to every box, it requires less work than
localeconv(), and offers more choices. This commit changes to use it,
and for more info when debugging, gets some additional info from it,
while avoiding some calls when not debugging
Commit: 3726a651d1f6410d5d39447ebb2120df7a870b84
https://github.com/Perl/perl5/commit/3726a651d1f6410d5d39447ebb2120df7a870b84
Author: Karl Williamson <[email protected]>
Date: 2022-08-13 (Sat, 13 Aug 2022)
Changed paths:
M cpan/version/t/07locale.t
Log Message:
-----------
version::07locale.t: Use I18N::Langinfo, not POSIX::localeconv()
The former is always present; the latter might not be.
Commit: 3ac7251af66ca4e1c26db3933578acd98789082e
https://github.com/Perl/perl5/commit/3ac7251af66ca4e1c26db3933578acd98789082e
Author: Karl Williamson <[email protected]>
Date: 2022-08-13 (Sat, 13 Aug 2022)
Changed paths:
M lib/locale_threads.t
Log Message:
-----------
locale_threads.t: Use I18N::Langinfo, not POSIX::localeconv()
The former is always present; the latter might not be
Commit: 6da80de33f6cd9cbc2b78342a7413402a777494d
https://github.com/Perl/perl5/commit/6da80de33f6cd9cbc2b78342a7413402a777494d
Author: Karl Williamson <[email protected]>
Date: 2022-08-13 (Sat, 13 Aug 2022)
Changed paths:
M t/run/locale.t
Log Message:
-----------
run/locale.t white space
Commit: 7c137ab4a9c16bf76c9dddba40151b75842d5e63
https://github.com/Perl/perl5/commit/7c137ab4a9c16bf76c9dddba40151b75842d5e63
Author: Karl Williamson <[email protected]>
Date: 2022-08-13 (Sat, 13 Aug 2022)
Changed paths:
M t/run/locale.t
Log Message:
-----------
run/locale.t: Use langinfo not localeconv
Commit: 88ec787b87aa5736ab8470cade6bef34a2e8ed61
https://github.com/Perl/perl5/commit/88ec787b87aa5736ab8470cade6bef34a2e8ed61
Author: Karl Williamson <[email protected]>
Date: 2022-08-13 (Sat, 13 Aug 2022)
Changed paths:
M locale.c
Log Message:
-----------
locale.c: Add fallbacks if no mbtowc()
This add heuristics that work well for non-English locales to determine
if a locale is UTF-8 or not when mbtowc() isn't available. It would be
a very rare compiler that didn't have that these days, but this covers
that case as best as I have been able to figure out.
Commit: 156d2d7d7eb7ebb85abbe977e524cb51284a4490
https://github.com/Perl/perl5/commit/156d2d7d7eb7ebb85abbe977e524cb51284a4490
Author: Karl Williamson <[email protected]>
Date: 2022-08-13 (Sat, 13 Aug 2022)
Changed paths:
M ext/I18N-Langinfo/t/Langinfo.t
Log Message:
-----------
Revert "XXX Temporarily skip on Windows"
This should now be fixed by intervening commits
Commit: 6d10cd3023235e1e7ece36d0c1a07466b7d18728
https://github.com/Perl/perl5/commit/6d10cd3023235e1e7ece36d0c1a07466b7d18728
Author: Karl Williamson <[email protected]>
Date: 2022-08-13 (Sat, 13 Aug 2022)
Changed paths:
M ext/POSIX/lib/POSIX.pm
Log Message:
-----------
Bump posix version
Commit: a72fa26b1cca79cab069e5ceaadbeb1d1efc71ab
https://github.com/Perl/perl5/commit/a72fa26b1cca79cab069e5ceaadbeb1d1efc71ab
Author: Karl Williamson <[email protected]>
Date: 2022-08-13 (Sat, 13 Aug 2022)
Changed paths:
M locale.c
Log Message:
-----------
XXX temp win32 debugging
Compare: https://github.com/Perl/perl5/compare/5fa2303c9cc3...a72fa26b1cca