Front page | perl.perl5.changes |
Postings from August 2022
[Perl/perl5] 48bf7c: locale.c: querylocale return mortalized copy
From:
Karl Williamson via perl5-changes
Date:
August 10, 2022 02:53
Subject:
[Perl/perl5] 48bf7c: locale.c: querylocale return mortalized copy
Message ID:
Perl/perl5/push/refs/heads/smoke-me/khw-locale4/000000-d18a98@github.com
Branch: refs/heads/smoke-me/khw-locale4
Home: https://github.com/Perl/perl5
Commit: 48bf7c22cce33e5081f732046a80b0d5bec081e4
https://github.com/Perl/perl5/commit/48bf7c22cce33e5081f732046a80b0d5bec081e4
Author: Karl Williamson <khw@cpan.org>
Date: 2022-08-09 (Tue, 09 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: 616697b52b123aaa1d1c12dfecb47f2f22671fec
https://github.com/Perl/perl5/commit/616697b52b123aaa1d1c12dfecb47f2f22671fec
Author: Karl Williamson <khw@cpan.org>
Date: 2022-08-09 (Tue, 09 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: 9b5b2b696f3d9b22610dc33dcff403f36cb4b86d
https://github.com/Perl/perl5/commit/9b5b2b696f3d9b22610dc33dcff403f36cb4b86d
Author: Karl Williamson <khw@cpan.org>
Date: 2022-08-09 (Tue, 09 Aug 2022)
Changed paths:
M locale.c
Log Message:
-----------
locale.c: Silence some compiler warnings if no LC_ALL
Commit: 0139f652e3a3daaee932c00edf6469f5ae1d4217
https://github.com/Perl/perl5/commit/0139f652e3a3daaee932c00edf6469f5ae1d4217
Author: Karl Williamson <khw@cpan.org>
Date: 2022-08-09 (Tue, 09 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: 80b407eed296c8704dfa051fe09ba7c4b8b798d2
https://github.com/Perl/perl5/commit/80b407eed296c8704dfa051fe09ba7c4b8b798d2
Author: Karl Williamson <khw@cpan.org>
Date: 2022-08-09 (Tue, 09 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: a781fc56f2bb82d5fbf89a24dd54a87caa965091
https://github.com/Perl/perl5/commit/a781fc56f2bb82d5fbf89a24dd54a87caa965091
Author: Karl Williamson <khw@cpan.org>
Date: 2022-08-09 (Tue, 09 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 from POSIX.xs to locale.c
This avoids duplicated logic.
Commit: eec8fad38fb502b3f179affa04121a2b72a66737
https://github.com/Perl/perl5/commit/eec8fad38fb502b3f179affa04121a2b72a66737
Author: Karl Williamson <khw@cpan.org>
Date: 2022-08-09 (Tue, 09 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: 9db065b147e67a6750a35f654510720c8e503901
https://github.com/Perl/perl5/commit/9db065b147e67a6750a35f654510720c8e503901
Author: Karl Williamson <khw@cpan.org>
Date: 2022-08-09 (Tue, 09 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: 6d3b5bcc66c5bed4d8c449d274382c59e3e9d100
https://github.com/Perl/perl5/commit/6d3b5bcc66c5bed4d8c449d274382c59e3e9d100
Author: Karl Williamson <khw@cpan.org>
Date: 2022-08-09 (Tue, 09 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: 86fbbe771c3221cced4bea5e124f737e4631eb19
https://github.com/Perl/perl5/commit/86fbbe771c3221cced4bea5e124f737e4631eb19
Author: Karl Williamson <khw@cpan.org>
Date: 2022-08-09 (Tue, 09 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: e7cd8e711f0988f607ed07ba035d0dc8f1910e51
https://github.com/Perl/perl5/commit/e7cd8e711f0988f607ed07ba035d0dc8f1910e51
Author: Karl Williamson <khw@cpan.org>
Date: 2022-08-09 (Tue, 09 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: 508fbae0bafdb2c21f797ee3998145f9f554a5df
https://github.com/Perl/perl5/commit/508fbae0bafdb2c21f797ee3998145f9f554a5df
Author: Karl Williamson <khw@cpan.org>
Date: 2022-08-09 (Tue, 09 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: 6d090914f9365877b83b51f2ea6d118cbc2d4802
https://github.com/Perl/perl5/commit/6d090914f9365877b83b51f2ea6d118cbc2d4802
Author: Karl Williamson <khw@cpan.org>
Date: 2022-08-09 (Tue, 09 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: e2f8ab481e25dd3e30ab8b5d1bc505e6d4f7a7a1
https://github.com/Perl/perl5/commit/e2f8ab481e25dd3e30ab8b5d1bc505e6d4f7a7a1
Author: Karl Williamson <khw@cpan.org>
Date: 2022-08-09 (Tue, 09 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: 467f2c28314cef7446d5ff93848d7b0f1b34697d
https://github.com/Perl/perl5/commit/467f2c28314cef7446d5ff93848d7b0f1b34697d
Author: Karl Williamson <khw@cpan.org>
Date: 2022-08-09 (Tue, 09 Aug 2022)
Changed paths:
M locale.c
Log Message:
-----------
locale.c: Use typedef to simplify
This allows some preprocessor conditionals to be removed
Commit: 9015fe41ee57fcc865e810004a2c3a5440e85527
https://github.com/Perl/perl5/commit/9015fe41ee57fcc865e810004a2c3a5440e85527
Author: Karl Williamson <khw@cpan.org>
Date: 2022-08-09 (Tue, 09 Aug 2022)
Changed paths:
M locale.c
Log Message:
-----------
locale.c: Rmv redundant cBOOL()
strEQ and && already return booleans
Commit: 2219c12147ebfbc03f829d52c43859069ddcdeb2
https://github.com/Perl/perl5/commit/2219c12147ebfbc03f829d52c43859069ddcdeb2
Author: Karl Williamson <khw@cpan.org>
Date: 2022-08-09 (Tue, 09 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: 16af952b086a68de7ba576450dc6f83fa2ca82a4
https://github.com/Perl/perl5/commit/16af952b086a68de7ba576450dc6f83fa2ca82a4
Author: Karl Williamson <khw@cpan.org>
Date: 2022-08-09 (Tue, 09 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: fd5ed3f9d38bde4239f488803deb3ee786f4e584
https://github.com/Perl/perl5/commit/fd5ed3f9d38bde4239f488803deb3ee786f4e584
Author: Karl Williamson <khw@cpan.org>
Date: 2022-08-09 (Tue, 09 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: a92a41d6f16d27c62679d2bbd70c880ccce8f3db
https://github.com/Perl/perl5/commit/a92a41d6f16d27c62679d2bbd70c880ccce8f3db
Author: Karl Williamson <khw@cpan.org>
Date: 2022-08-09 (Tue, 09 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: 85108147bff4f54f58e03212f579b2fe28fc25c8
https://github.com/Perl/perl5/commit/85108147bff4f54f58e03212f579b2fe28fc25c8
Author: Karl Williamson <khw@cpan.org>
Date: 2022-08-09 (Tue, 09 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: 04acc349e241136b88ec121118823ad9e77edc01
https://github.com/Perl/perl5/commit/04acc349e241136b88ec121118823ad9e77edc01
Author: Karl Williamson <khw@cpan.org>
Date: 2022-08-09 (Tue, 09 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: 5d6e75f633cad27bba7b81026edced9dcf102029
https://github.com/Perl/perl5/commit/5d6e75f633cad27bba7b81026edced9dcf102029
Author: Karl Williamson <khw@cpan.org>
Date: 2022-08-09 (Tue, 09 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: 3cb5656509290ea06c4e5176a0977a3b9dfc78c1
https://github.com/Perl/perl5/commit/3cb5656509290ea06c4e5176a0977a3b9dfc78c1
Author: Karl Williamson <khw@cpan.org>
Date: 2022-08-09 (Tue, 09 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: fedbe6eaf1529d53fb931c2a808979644ca782a5
https://github.com/Perl/perl5/commit/fedbe6eaf1529d53fb931c2a808979644ca782a5
Author: Karl Williamson <khw@cpan.org>
Date: 2022-08-09 (Tue, 09 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: 54c84797622aa6a7b488d1dcdf868e803ac16170
https://github.com/Perl/perl5/commit/54c84797622aa6a7b488d1dcdf868e803ac16170
Author: Karl Williamson <khw@cpan.org>
Date: 2022-08-09 (Tue, 09 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: 54973f568b16e8362a4997f03e95060cc7849b2b
https://github.com/Perl/perl5/commit/54973f568b16e8362a4997f03e95060cc7849b2b
Author: Karl Williamson <khw@cpan.org>
Date: 2022-08-09 (Tue, 09 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: bf37f16488d2a6b2de427f7dd9652820b54434e0
https://github.com/Perl/perl5/commit/bf37f16488d2a6b2de427f7dd9652820b54434e0
Author: Karl Williamson <khw@cpan.org>
Date: 2022-08-09 (Tue, 09 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: e5128d7cc251908f026a2671a096f720777bc5f7
https://github.com/Perl/perl5/commit/e5128d7cc251908f026a2671a096f720777bc5f7
Author: Karl Williamson <khw@cpan.org>
Date: 2022-08-09 (Tue, 09 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: 7f54a1854aef77fb260e67188639afecc9c058be
https://github.com/Perl/perl5/commit/7f54a1854aef77fb260e67188639afecc9c058be
Author: Karl Williamson <khw@cpan.org>
Date: 2022-08-09 (Tue, 09 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: b7f3ba2140e78efc8abc38d1aa84a5e336ba957a
https://github.com/Perl/perl5/commit/b7f3ba2140e78efc8abc38d1aa84a5e336ba957a
Author: Karl Williamson <khw@cpan.org>
Date: 2022-08-09 (Tue, 09 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: b0228760cf26bb3653ddf93614b9872b382fe870
https://github.com/Perl/perl5/commit/b0228760cf26bb3653ddf93614b9872b382fe870
Author: Karl Williamson <khw@cpan.org>
Date: 2022-08-09 (Tue, 09 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: cc41e95ac147f0286bb8059a2454dd840b0a9e44
https://github.com/Perl/perl5/commit/cc41e95ac147f0286bb8059a2454dd840b0a9e44
Author: Karl Williamson <khw@cpan.org>
Date: 2022-08-09 (Tue, 09 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: 1353a7afde3d1ea4990f7ca3e5f60d7ba2de7241
https://github.com/Perl/perl5/commit/1353a7afde3d1ea4990f7ca3e5f60d7ba2de7241
Author: Karl Williamson <khw@cpan.org>
Date: 2022-08-09 (Tue, 09 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: ed0cbeca48384615c157eab8e3ebac2ffdd854e3
https://github.com/Perl/perl5/commit/ed0cbeca48384615c157eab8e3ebac2ffdd854e3
Author: Karl Williamson <khw@cpan.org>
Date: 2022-08-09 (Tue, 09 Aug 2022)
Changed paths:
M embed.fnc
M embed.h
M locale.c
M perl.h
M proto.h
M utf8.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: a1dbffc24704e01ca890e2b253eda0bee77f1520
https://github.com/Perl/perl5/commit/a1dbffc24704e01ca890e2b253eda0bee77f1520
Author: Karl Williamson <khw@cpan.org>
Date: 2022-08-09 (Tue, 09 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: 147aef1613b7b1a579cf180880991625695b3c51
https://github.com/Perl/perl5/commit/147aef1613b7b1a579cf180880991625695b3c51
Author: Karl Williamson <khw@cpan.org>
Date: 2022-08-09 (Tue, 09 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: 21e73cd3c59dd4242846b483d4ba0d005a576de9
https://github.com/Perl/perl5/commit/21e73cd3c59dd4242846b483d4ba0d005a576de9
Author: Karl Williamson <khw@cpan.org>
Date: 2022-08-09 (Tue, 09 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: d3c725d9504869eef70e14097c4310dd76f281dc
https://github.com/Perl/perl5/commit/d3c725d9504869eef70e14097c4310dd76f281dc
Author: Karl Williamson <khw@cpan.org>
Date: 2022-08-09 (Tue, 09 Aug 2022)
Changed paths:
M locale.c
Log Message:
-----------
locale.c: Add branch prediction, comments
Commit: b3099e7cc24a5029627365e2b0fc6bd517694e6b
https://github.com/Perl/perl5/commit/b3099e7cc24a5029627365e2b0fc6bd517694e6b
Author: Karl Williamson <khw@cpan.org>
Date: 2022-08-09 (Tue, 09 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: fd3b223b11d06185d5b20ef33e23f631d5dc6640
https://github.com/Perl/perl5/commit/fd3b223b11d06185d5b20ef33e23f631d5dc6640
Author: Karl Williamson <khw@cpan.org>
Date: 2022-08-09 (Tue, 09 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: 8b094ed57830bc1dd0a85d686d7415eeac583bf0
https://github.com/Perl/perl5/commit/8b094ed57830bc1dd0a85d686d7415eeac583bf0
Author: Karl Williamson <khw@cpan.org>
Date: 2022-08-09 (Tue, 09 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: 346b3ad2e64c5d9f834157c6221df1e34288a2e1
https://github.com/Perl/perl5/commit/346b3ad2e64c5d9f834157c6221df1e34288a2e1
Author: Karl Williamson <khw@cpan.org>
Date: 2022-08-09 (Tue, 09 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: 7ea21a3510ba3ac5e0768ec627fb754df8342dfb
https://github.com/Perl/perl5/commit/7ea21a3510ba3ac5e0768ec627fb754df8342dfb
Author: Karl Williamson <khw@cpan.org>
Date: 2022-08-09 (Tue, 09 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: 6148f8b1f1cbbbbcc733461e6ccc51a5130b9512
https://github.com/Perl/perl5/commit/6148f8b1f1cbbbbcc733461e6ccc51a5130b9512
Author: Karl Williamson <khw@cpan.org>
Date: 2022-08-09 (Tue, 09 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: d18a98477947031a96a7850c558a1cea053c156e
https://github.com/Perl/perl5/commit/d18a98477947031a96a7850c558a1cea053c156e
Author: Karl Williamson <khw@cpan.org>
Date: 2022-08-09 (Tue, 09 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
Compare: https://github.com/Perl/perl5/compare/48bf7c22cce3%5E...d18a98477947
-
[Perl/perl5] 48bf7c: locale.c: querylocale return mortalized copy
by Karl Williamson via perl5-changes