Commit graph

57 commits

Author SHA1 Message Date
rfm
6667842dd5 Update FSF address as requested by Gregory 2024-11-07 13:37:59 +00:00
rfm
58ae7db59a fixup headers for deletion of obsolete lock code 2024-05-30 11:06:23 +01:00
rfm
be12e91109 locale method fixup with testcase 2024-02-11 15:03:37 +00:00
rfm
79a1a6b944 fix for #368 2024-02-06 14:22:04 +00:00
Frederik Seiffert
f7eff46e86 Fix NSLocale -countryCode incorrectly returning language code 2024-02-01 10:27:14 +01:00
sbeard-eh
1a3d869ab1
Fix for locale handling changes in ICU 64
Since ICU 64, the locale handling has changed such that passing an empty string to uloc_canonicalize no longer returns the en_US_POSIX locale as it did in previous versions. 
See https://icu.unicode.org/download/64#h.plg55ia6o3du
2022-11-01 20:20:48 +00:00
Frederik Seiffert
dc32970502 Add support for using ICU DLL from Windows 10
Requires Windows 10 version 1903 (May 2019 Update):
https://docs.microsoft.com/en-us/windows/win32/intl/international-components-for-unicode--icu-

Also adds missing configure check for unicode/utext.h.
2021-08-03 16:52:38 +02:00
Frederik Seiffert
0582eddd96 Export string constants and annotate exported function implementations
Moves scattered string constants to externs.m, and removes obsolete code replacing constant strings.
2021-03-27 17:36:15 +01:00
Richard Frith-Macdonald
be173ab404 Fix resource leaks (failure to close) on error. 2021-02-03 16:23:43 +00:00
Frederik Seiffert
b549dbbaec NSLocale improvements
Use "instancetype" for instance-returning methods. Fix method signature of -displayNameForKey:value:.
2020-05-07 15:30:36 +02:00
fredkiefer
a48694941c Add newer features for NSDateComponents and
started to clean up NSCalendar implementation.
2020-04-26 21:13:22 +02:00
fredkiefer
95abcbd694 * Source/NSURL.m: Fix compiler warnigns.
* Headers/Foundation/NSLocale.h,
* Source/NSLocale.m: Add a few convenience methods from MacOS 10.12.
2020-03-12 14:58:46 +01:00
Richard Frith-Macdonald
3ced3237e8 Use standard locks rathere than obsolete lazy lock classes 2018-04-10 14:59:35 +01:00
Richard Frith-Macdonald
113867e9e6 fix for collation alone being set 2018-02-04 10:51:01 +00:00
Stefan Bidigaray
952884dd6a Fix bug in NSLocale ISO codes methods. 2017-08-24 11:03:11 -04:00
Daniel Ferreira
5ab00e2c49 NSCalendar: add new calendar identifier constants
Add new calendar identifier constants to NSCalendar, to add
compatibility for newer OSX applications. Some identifiers do not hold
parity with the older equivalents and have been left unimplemented, with
the gregorian calendar as a fallback.
2017-06-29 21:18:16 +01:00
Richard Frith-MacDonald
1ee226b495 light tidying
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@39568 72102866-910b-0410-8b05-ffd578937521
2016-03-20 11:53:01 +00:00
Wolfgang Lux
afc8ff1c47 Add method +[NSLocale localeWithLocaleIdentifier:], which was
introduced in OS X 10.6.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@39516 72102866-910b-0410-8b05-ffd578937521
2016-03-10 08:48:40 +00:00
Richard Frith-MacDonald
5f2a9f6fc5 Fix minor leak
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@38560 72102866-910b-0410-8b05-ffd578937521
2015-05-26 13:26:30 +00:00
Richard Frith-MacDonald
ed09c55959 leak detection improvements
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@37003 72102866-910b-0410-8b05-ffd578937521
2013-08-22 15:44:54 +00:00
Richard Frith-MacDonald
f371df09b6 more static analyser fixups
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@36532 72102866-910b-0410-8b05-ffd578937521
2013-04-14 18:49:23 +00:00
Richard Frith-MacDonald
b659603cb9 Fix bug #38118 reported by X Y <macgritsch>
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@36006 72102866-910b-0410-8b05-ffd578937521
2013-01-21 10:02:34 +00:00
David Chisnall
433554830d Fix the build with the pure non-fragile ABI by declaring macros before using them.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@33724 72102866-910b-0410-8b05-ffd578937521
2011-08-13 15:28:22 +00:00
Stefan Bidigaray
0b402994bb Add a hack to reset formatter properties along with the formatter itself. This can't be the best way to go about this so feel free to provide input for a better solution. Also added 2 missing unlocks in NSLocale.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@32535 72102866-910b-0410-8b05-ffd578937521
2011-03-12 14:22:21 +00:00
Richard Frith-MacDonald
360e28f269 User defaults language/setup restructuring
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@32454 72102866-910b-0410-8b05-ffd578937521
2011-03-05 07:54:05 +00:00
Richard Frith-MacDonald
e6fca186b1 portability tweak
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@32290 72102866-910b-0410-8b05-ffd578937521
2011-02-22 11:55:37 +00:00
Richard Frith-MacDonald
27550994ee use the _() macro for localisation within base
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@32173 72102866-910b-0410-8b05-ffd578937521
2011-02-15 06:25:54 +00:00
Richard Frith-MacDonald
60c38bae4e Partial revert
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@32126 72102866-910b-0410-8b05-ffd578937521
2011-02-13 06:40:20 +00:00
Richard Frith-MacDonald
0592b48e55 Raise when attempting to use unimplemented classes. Check for null pointers
in more runtime functions (probably still many cases where we crash if null
pointers are passed to the API and Apple behave more tolrantly).


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@32124 72102866-910b-0410-8b05-ffd578937521
2011-02-13 06:31:05 +00:00
Richard Frith-MacDonald
705e1a32ca Attempts to prevent leak warnings from static analyser
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@32090 72102866-910b-0410-8b05-ffd578937521
2011-02-12 06:51:42 +00:00
David Chisnall
4d47a08f1d Another case of the bug fixed in r32066.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@32078 72102866-910b-0410-8b05-ffd578937521
2011-02-11 15:09:14 +00:00
Richard Frith-MacDonald
336c7bf021 Revert back to working code!
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@32072 72102866-910b-0410-8b05-ffd578937521
2011-02-11 13:53:54 +00:00
David Chisnall
dd88a65f4a Fix nonsense use of libicu, spotted by the analyser, with a not-so-helpful warning (he status pointer passed in to icu functions MUST be initialised to 0, because the ICU functions test it as well as setting it so you can call a load of ICU functions with the same status flag and not wrap them all in tests).
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@32066 72102866-910b-0410-8b05-ffd578937521
2011-02-11 12:39:01 +00:00
Richard Frith-MacDonald
525371f50b locale tweaks
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@32006 72102866-910b-0410-8b05-ffd578937521
2011-02-07 17:21:00 +00:00
Stefan Bidigaray
d136fc4986 Update autoupdatingCurrentCalendar whenever Locale, Time Zone and/or Calendar defaults change.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@31977 72102866-910b-0410-8b05-ffd578937521
2011-01-29 18:49:21 +00:00
Stefan Bidigaray
b06267a94f Update autoupdatingCurrentLocale whenever the Locale default changes. The -currentLocale method now also checks Locale default.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@31972 72102866-910b-0410-8b05-ffd578937521
2011-01-29 15:33:27 +00:00
Stefan Bidigaray
3029c5982c Add currency code when creating locale identifiers. And fix a crash in NSDateFormatter due to double release.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@31956 72102866-910b-0410-8b05-ffd578937521
2011-01-27 00:37:52 +00:00
Stefan Bidigaray
807395c0a1 Minor memory management fixed to NSLocale.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@31955 72102866-910b-0410-8b05-ffd578937521
2011-01-26 23:59:23 +00:00
Stefan Bidigaray
8111e270df Fixed decimal separator behavior in NSNumberFormatter... NSLocale tests requiring NSNumberFormatter should all work as expected, now.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@31879 72102866-910b-0410-8b05-ffd578937521
2011-01-12 00:04:04 +00:00
Stefan Bidigaray
27bf149e78 Added a few more methods to NSNumberFormatter and implemented NSLocale code that required changes to NSNumberFormatter. NSLocale now passes all tests in the testsuite.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@31863 72102866-910b-0410-8b05-ffd578937521
2011-01-09 21:16:20 +00:00
Stefan Bidigaray
85149f6b35 Fixed bugs found by testsuite.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@31861 72102866-910b-0410-8b05-ffd578937521
2011-01-09 15:54:49 +00:00
Stefan Bidigaray
03c2eaaedb Added copying and coding to NSCalendar. Fixed a few things in NSLocale.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@31822 72102866-910b-0410-8b05-ffd578937521
2011-01-02 03:47:29 +00:00
Stefan Bidigaray
797780c433 Minor fixes to NSCalendar and NSLocale. Also implemented NSCalendar's +currentCalendar.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@31819 72102866-910b-0410-8b05-ffd578937521
2011-01-01 22:20:16 +00:00
Stefan Bidigaray
798336be99 Fixed some typos.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@31818 72102866-910b-0410-8b05-ffd578937521
2011-01-01 21:41:59 +00:00
Stefan Bidigaray
e970eb14d6 Added mappings to canonical locale identifers. The NSLocale class can now, for example, map from AmericanEnglish to en_US. The -preferredLanguages method now works, as well.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@31809 72102866-910b-0410-8b05-ffd578937521
2010-12-31 17:46:46 +00:00
Richard Frith-MacDonald
62de5b485f mostly fixups for ICU
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@31742 72102866-910b-0410-8b05-ffd578937521
2010-12-16 10:09:43 +00:00
Stefan Bidigaray
1b50ad217a Added locale keyword handling in -componentsFromLocaleIdentifier: and made a few minor modifications to NSLocale. Also included changelog entry for last commit.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@31740 72102866-910b-0410-8b05-ffd578937521
2010-12-16 02:15:27 +00:00
Stefan Bidigaray
b16f679be6 Added NSCalendar dependent code even though NSCalendar doesn't currently do anything.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@31736 72102866-910b-0410-8b05-ffd578937521
2010-12-15 01:41:34 +00:00
Stefan Bidigaray
b364b9fa33 Actually initialize _components dictionary before adding things to it.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@31734 72102866-910b-0410-8b05-ffd578937521
2010-12-14 23:42:22 +00:00
Stefan Bidigaray
174ab7cde4 Implemented more NSLocale functionality.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@31728 72102866-910b-0410-8b05-ffd578937521
2010-12-13 03:37:35 +00:00