Age | Commit message (Collapse) | Author | Files | Lines |
|
* Enable Globalization Invariant on OSX
* Fix typo
* Fix small typo
* Remove static link to ICU lib
* Addressing the feedback
|
|
* Invariant Globalization Work
* Convert the testing Exceptions to asserts
* Remove un-needed comment
* Fix typos
* Fix unrelated typo
* Address the PR feedback
* More feedback addressing
* More feedback addressing
* Fix Linux break
* More feedback addressing
* cleanup
|
|
The scanning that tries to find locally installed ICU version was not
considering the case when only ICU library files with major version
component were present (like libicuuc.so.52). This is a rare case that
I've seen so far only when people built and installed ICU manually.
But it is worth to add checks for such case as a fallback, which is
what this change does.
I have also added checks for minorVersion and subVersion being -1 when
trying to detect the symbol versioning used. While the pre-existing code
would still work fine, it would unnecessarily try nonsensical version.
|
|
The config.cmake was not getting the ICU library paths it requires to
build a code that detects presence of the ucol_setMaxVariable.
I have excluded the libraries detection from the CMakeLists.txt
some time ago since they are not used in the build itself anymore,
but I have not realized that they are needed for this detection
script that's included from the CMakeLists.txt.
|
|
|
|
Added overloads for String.Replace so that they now accept
StringComparison and CultureInfo as input parameters.
|
|
* Adding Microsoft.NETCore.Native package (#8791)
* "Adding Microsoft.NETCore.Native package"
* Adding generic linux configuration to Microsoft.NETCore.Native package
* Fixing the OSX pkgproj of Microsoft.NETCore.Native to include S.Globalization.Native.dylib and not .so
* Fixing the osx release build.
|
|
GNU which might not be installed on a minimal GNU/Linux installation.
Refs #6994 and #7025.
|
|
This reverts commit eea7b4691c0a489435814e48a257a9d047475006.
|
|
* "Adding Microsoft.NETCore.Native package"
* Adding generic linux configuration to Microsoft.NETCore.Native package
* Fixing the OSX pkgproj of Microsoft.NETCore.Native to include S.Globalization.Native.dylib and not .so
|
|
The existing way of verifying shared library dependencies, used for
System.Globalization.Native.so, doesn't work on platforms that don't
have ldd or where ldd doesn't support the `-r` option.
This change makes the check happen on non-Alpine Linux only for now.
It also refactors the way the check is performed. Instead of doing it
post build in the build.sh, it is now performed as a postbuild phase
of the System.Globalization.Native target and it is also generalized
so that we can easily add such verification to other build targets.
The new verify-so.sh script is also used in corefx.
|
|
* Avoid failures when allocate memory in native
using new in the native side can throw and the app will shutdown. instead we detect the failure and throw a managed exception
* Use same mechanism we return the error code from GetSortHandle
* Add assert
* Dispose the safeHandle
|
|
* Enable more netstandard 1.7 Globalization APIs
* Enable Windows support for the new APIs
* Fix spaces and line alignments
|
|
there was a change done by the PR #7773 which removed the dependency on ICU version. and there is another PR #7811 which used more ICU APIs not listed in the shim.
the change here is to add these APIs to the shim
|
|
* Enable CultureInfo netstandard 1.7 APIs on Linux
* fix spaces
* Use Array.Empty<CultureInfo> instead of CultureInfo[0]
|
|
(#7773)
Remove dependency of System.Globalization.Native.so on specific ICU version
|
|
* Enable RegionInfo netstandard 1.7 APIs
* Fix the typo
* lowercase TRUE and FALSE
|
|
The issue was the symbol is exported by the ICU lib. Including headers
was not enough. The linker requires the libraries to succeed.
With this fix, CoreCLR successfully builds on Gentoo Linux 100%.
Tested with LXC gentoo container on Ubuntu machine.
Steps to configure and build:
https://gist.github.com/jasonwilliams200OK/1a2e2c0e904ffa95faf6333fcd88d9b8
Fix #5160
|
|
We should ignore empty collaction elements at the end of the string
when doing our EndsWith checks. This means the match ICU finds might
not span to the end of string, but the only elements after the match
before the end are completely ignorable.
U+00AD (SOFT HYPHEN) is one such case where the codepoint is completely
ignorable.
Fixes dotnet/corefx#3467
|
|
Previously, we would just ask ICU what it thought the default locale
was, since that seemed like a reasonable thing to do. However, in cases
where LANG, LC_MESSAGES and LC_ALL where unset and setlocale(3) returned
"C", ICU would use "en-US-POSIX" as a default locale.
The above case is actually what happens by default when you are running
in docker and en-US-POSIX has very odd collation rules (ASCII characters
which differ only by case are still treated as seperate letters) which
trip folks up.
So in this case, we'll use Invariant. If setlocale(3) returns a non
C/POSIX locale or any of LANG, LC_MESSAGES, or LC_ALL are set to non
empty values, we'll continue to let ICU figure out what to do.
|
|
Currently only enabled for arm64
|
|
|
|
Issue #3669
Created a common cmake strip_symbols function that all the modules and programs
use to strip the symbols out of the main into a separate .dbg (Linux) or .dSYM (OSX)
file.
Added an install_clr cmake function to encapsulate the install logic.
Changed all the library module cmake install lines from a TARGETS to a FILES one. The
TARGETS based install directives caused cmake to relink the binary and copy the unstripped
version to the install path. Left the all programs like corerun or ildasm as TARGETS
installs because on OSX FILES type installs don't get marked as executable.
Need to use "get_property(strip_source_file TARGET ${targetName} PROPERTY LOCATION)" for
the older versions of cmake and "set(strip_source_file $<TARGET_FILE:${targetName}>)" on
newer versions (v3 or greater).
|
|
This reverts commit fb80bad2ed19970472ddefe539520abef42a52d0.
|
|
Fixed by calling ICU's ucal_getTimeZoneDisplayName to read the display names for the current locale.
Fix https://github.com/dotnet/corefx/issues/2748
|
|
|
|
This reverts commit 6b1d2938ec4a5a2c64fd849797ec7800ed3ab575.
|
|
|
|
For consistency and to enable eventual sharing of the same code with CoreRT, I have changed the naming convention for System.Globalization.Native exports to match dotnet/corefx#4818.
|
|
|
|
The IdnaConformanceTests fail on Unix because \u00DF, \u200C and \u200D characters are not being handled as specified in the http://www.unicode.org/Public/idna/6.0.0/IdnaTest.txt file.
The fix is to use UIDNA_NONTRANSITIONAL_TO_UNICODE and UIDNA_CHECK_CONTEXTJ options when calling uidna_openUTS46.
Partial fix for https://github.com/dotnet/corefx/issues/3406.
|
|
symbols
By default, ICU alternate shifted collation handling only ignores punctuation, not all symbols, so change the "variable top" to include all symbols and currency characters.
Fix #4907
|
|
|
|
This change replaces all calls of OS specific functions in the GC by a call to
a platform agnostic interface. Critical sections were abstracted too.
The logging file access was changed to use CRT functions instead of Windows specific APIs.
A "size" member was added to the card_table_info so that we can pass the right
size to the VirtualRelease method when destroying the card table.
I have also fixed a bug in the gc_heap::make_card_table error path where when VirtualCommit
failed, it called VirtualRelease with size that was not the reserved size, but
the committed size.
Other related changes
- All interlocked operations moved to Interlocked class as static methods
- Removed unused function prototypes
- Shuffled stuff in the root CMakeLists.txt to enable building the GC sample using the
settings inherited from the root CMakeLists.txt and to clean up some things that have
rotted over time, like the FEATURE_xxx macros not being in one alphabetically ordered
block
- Fixed the VOLATILE_MEMORY_BARRIER macro in the gcenv.base.h
- Replaced uint32_t thread id by EEThreadId
- Removed thread handles storage (g_gc_thread) from the GC. The thread handle is closed right after the thread is launched. That allowed me to get rid of the GCThreadHandle
- Renamed the methods of the EEThreadId to be easier to understand
- Moved the gcenv.windows.cpp and gcenv.unix.cpp to the sample folder
|
|
1. When IgnoreSymbols is true, ensure we still ignore half and fullwidth characters that are symbols.
2. Hiragana-Katakana characters differ at the tertiary strength, fixing the rule.
3. Fix collation on OSX which uses ICU 55.1.
ICU 55 doesn't support having certain unicode characters using primary '<' rules.
These characters are not necessary in the rules, since Windows always treats them the same.
Removing 0x3099 and 0x309A from the half/full width rules.
|
|
|
|
|
|
|
|
|
|
passed in. This is in preparation of creating different UCollators for each option.
|
|
Cache UCollators in a Locale
|
|
Creating a UCollator is an expensive operation and we are presently
doing it on ever collation operation. We can improve this by caching
the UCollators we use for collation on the CompareInfo object itself.
This change introduces a new method GetSortHandle which gives back an
opaque wrapper which can be used in collation operations instead of a
culture name.
Internally we represent this is a struct holding the two types of
UCollators we care about (if we add additional collators per locale with
different options to handle other types of CompareOption flags, we can
cache these as well). Collation methods can get a `const UCollator*`
reference from the sort handle which is safe to share across
threads (per the ICU Design Guidelines[1]).
Unfortunately, tracking the lifetime of the SortHandle itself is not as
straightfoward as I would like. Right now, we use a SafeHandle to wrap
the internal handle and rely on the finalizer of the class to clean up
the native resources. However this means that the following code sample
will create two finalizable objects:
```csharp
var c1 = new CultureInfo("en-US").CompareInfo;
var c2 = new CultureInfo("en-US").CompareInfo;
```
If this ends up being an issue, we could explore an approach where we
keep a cahce of SortHandles in managed code and pass out references to
that SortHandle which would let us share a single SortHandle for a given
locale across more than one CompareInfo object.
Wins are seeing in places where we previously did lots of string
comparisions in a tight loop (for example: dotnet/corefx#3811) moving
these operations down to ~6ms per iteration vs ~330ms on my local machine.
[1]: http://userguide.icu-project.org/design
|
|
DateTimeFormat.ShortDatePattern should use CLDR 'short' format on Unix.
|
|
The StartsWith ICU wrapper was not checking the result of usearch_first
to see if it was USEARCH_DONE, indicating no match found. This has two
ramifications:
1. When there isn't a match, USEARCH_DONE (-1) gets passed in as the
textLength argument to ucol_openElements, which treats -1 as meaning
the string isn't null-terminated, and thus ends up walking the string
looking for non-ignorable collation elements. Our tests have been passing
because they've been using strings containing only non-ignorable
elements, and thus the first character checked causes us to bail and correctly
return false. If nothing else, this is an unnecessary perf overhead.
2. But on top of that if there are only ignorable collation elements
before the first null character in the string (e.g. if the string begins
with a null character), then because we told ICU that the string ended
at the first null character, it'll stop walking the string and return
a match. e.g. "\0bug".StartsWith("test") returns true incorrectly.
This commit simply adds a check for USEARCH_DONE to StartsWith.
EndsWith already has such a check.
|
|
The DateTimeFormat.ShortDatePattern is currently defaulting to using CLDR's 'yMd' skeleton. However, this value doesn't produce the best format for all cultures, ex. "de-DE". LongDatePattern uses CLDR's 'full' format. To be symmetrical, the ShortDatePattern should be using CLDR's 'short' format.
Fix https://github.com/dotnet/coreclr/issues/1736.
|
|
Our current ICU shims for StartsWith, EndsWith, IndexOf, and LastIndexOf
take the length of the source string but not the length of the target
string. This forces ICU to compute the length of the string by searching
for a null terminator. We can save those costs and be more accurate
around nulls in the target string by passing the known length in.
|
|
Remove OSX Homebrew ICU dependency
|
|
There were a few problems that needed to be addressed:
- Our detection logic around testing if ICU supported a feature was
still checking for C++ stuff instead of the coresponding C
code (which we ended up using).
- There was some cleanup we could do now that the OSX and other Unix
builds were split apart
|
|
|
|
|