Commit Graph

142 Commits

Author SHA1 Message Date
Michael Stefaniuc fe70e0e58f kernel32: Use the ARRAY_SIZE() macro.
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-08-14 10:15:59 +02:00
Akihiro Sagawa a5da525229 kernel32: Fix LCMapString(LCMAP_HALFWIDTH) in some cases.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=45439
Signed-off-by: Akihiro Sagawa <sagawa.aki@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-07-12 17:01:45 +02:00
Matej Špindler da5112c743 kernel32: Check for LOCALE_NOUSEROVERRIDE for neutral locales.
Signed-off-by: Matej Špindler <spindler.matej@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-05-22 21:58:02 +02:00
Louis Lenders e0f9ff9eb0 kernel32: Improve stub for SetThreadUILanguage.
Signed-off-by: Louis Lenders <xerox.xerox2000x@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-04-02 20:47:11 +02:00
Jarkko Korpi dc5b22963b kernel32: Silence repeated LocaleNameToLCID unsupported flags.
Signed-off-by: Louis Lenders <xerox.xerox2000x@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-03-21 10:14:44 +01:00
Sergio Gómez Del Real 2d74a4ff43 kernel32: Implement FindNLSStringEx.
Signed-off-by: Sergio Gómez Del Real <sdelreal@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-03-13 20:58:07 +01:00
Alexandre Julliard c63a08586f kernel32: Don't return a parent locale for neutral locales in GetLocaleInfoEx.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-11-28 20:32:52 +01:00
Alexandre Julliard c5a39bd98f kernel32: Keep the sublanguage specified by the script name when looking for the default.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-11-13 19:43:13 +01:00
Alexandre Julliard de7e687801 kernel32: Also match script name when looking for a locale.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-11-13 19:04:04 +01:00
Jactry Zeng b9a9fe4a04 kernel32: Add stub for ResolveLocaleName.
Signed-off-by: Jactry Zeng <jzeng@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-07-19 19:13:30 +02:00
Aric Stewart 9dc5d299f1 kernel32: Improve locale detection on Android.
setlocale is coded to just return 'C' for all inquiries ignoring locale
that may be set in the environment.

Signed-off-by: Aric Stewart <aric@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-04-03 17:59:09 +02:00
Alex Henrie 0b95ebd283 kernel32: Check for invalid flags in codepage conversion functions.
Signed-off-by: Alex Henrie <alexhenrie24@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-03-28 10:31:46 +02:00
Andrew Eikum 72b9acd94b kernel32: Don't care about case when finding matching locale.
Signed-off-by: Andrew Eikum <aeikum@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-01-25 20:04:51 +01:00
Andrew Eikum 7737693693 kernel32: Use different default sublangs for Spanish and Chinese.
Signed-off-by: Andrew Eikum <aeikum@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-01-25 20:04:49 +01:00
Jacek Caban 26d0105cd8 kernel32: Improved GetUserPreferredUILanguages stub.
Implementation and tests are based on GetSystemPreferredUILanguages.

Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-10-19 08:16:54 -07:00
Akihiro Sagawa 429ca40fc8 kernel32: Implement LCMAP_HALFWIDTH.
Signed-off-by: Akihiro Sagawa <sagawa.aki@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-10-03 11:59:57 +02:00
Akihiro Sagawa 85cff1717d kernel32: Implement LCMAP_FULLWIDTH.
Signed-off-by: Akihiro Sagawa <sagawa.aki@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-10-03 11:59:41 +02:00
Akihiro Sagawa 12c547919f kernel32: Implement LCMAP_KATAKANA.
Signed-off-by: Akihiro Sagawa <sagawa.aki@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-09-23 21:02:58 +09:00
Akihiro Sagawa c4af608845 kernel32: Implement LCMAP_HIRAGANA.
Signed-off-by: Akihiro Sagawa <sagawa.aki@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-09-23 21:02:53 +09:00
Akihiro Sagawa 659e161d7e kernel32: Refactor the codepath and a variable usage.
Signed-off-by: Akihiro Sagawa <sagawa.aki@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-09-23 20:56:53 +09:00
Akihiro Sagawa 5d907050e2 kernel32: Short circuit required length calculation.
Signed-off-by: Akihiro Sagawa <sagawa.aki@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-09-23 20:52:34 +09:00
Akihiro Sagawa 5fbdd644d6 kernel32: Zero is an invalid flag value.
Signed-off-by: Akihiro Sagawa <sagawa.aki@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-09-23 20:50:38 +09:00
Akihiro Sagawa 70a6546753 kernel32: Do not allow to combine NORM_IGNORENONSPACE and/or NORM_IGNORESYMBOLS with other LCMAP flags.
Signed-off-by: Akihiro Sagawa <sagawa.aki@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-09-23 20:50:21 +09:00
Jacek Caban 505406fc83 kernel32: Fixed handling LOCALE_NAME_USER_DEFAULT in GetLocaleInfoEx.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-08-27 13:23:33 +09:00
Francois Gouget c8d1fbc6d2 kernel32: Fix typos in a couple of comments.
Signed-off-by: Francois Gouget <fgouget@free.fr>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-07-04 11:01:42 +09:00
Ken Thomases d90f29d817 kernel32: Overhaul the locale determination on the Mac.
The C library locale is inadequate for conveying the Mac user settings between
LOCALE_Init() and setup_unix_locales().  The set of locales supported by the C
library can't express the combinations allowed in user settings.

Setting LANG to a user-settings-derived locale when there's no corresponding C
library locale is actually worse than leaving it unset.  It will prevent the
C library from honoring the LC_* variables (other than LC_ALL).  That's why
Terminal.app won't set LANG in that case, it just sets LC_CTYPE=UTF-8.  This
commit makes Wine follow similar logic in not setting LANG if the C library
doesn't support the Mac user settings.

Rather, it uses a wrapper around setlocale() to query the locale.  That wrapper
returns a value representing the Mac user settings if the C library comes up
empty.  It also has logic to handle Terminal's setting LC_CTYPE=UTF-8, since
parse_locale_name() can't handle that properly.

Signed-off-by: Ken Thomases <ken@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-06-17 00:09:19 +09:00
Alexandre Julliard 73d9e2ebff kernel32: Use RtlCompareUnicodeStrings in CompareStringOrdinal for consistent results.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-06-14 17:09:54 +09:00
Piotr Caban 4fdfa29e60 kernel32: Use utf8 for filenames encoding if different encoding was not specified on Mac.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Ken Thomases <ken@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-06-01 00:21:47 +09:00
Nikolay Sivov 632266e5b5 kernel32: Set C3_KASHIDA only for kashida character.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-05-16 15:28:55 +09:00
Nikolay Sivov 73f7bf57cb kernel32: Handle NULL locale name in IsValidLocaleName().
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-05-16 15:28:42 +09:00
Hans Leidekker c90845cf93 kernel32: Improve the stub for GetThreadPreferredUILanguages.
Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-04-29 20:30:57 +09:00
Louis Lenders a6e1adb8b7 kernel32: Print a FIXME only once in LCMapStringEx.
Signed-off-by: Louis Lenders <xerox.xerox2000x@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-04-26 23:30:16 +09:00
Alexandre Julliard 0bbeaae678 make_unicode: Mark most data tables as hidden.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-02-25 00:25:01 +09:00
Stefan Leichter 9cd67d2a5e kernel32: Return a dummy value in GetSystemPreferredUILanguages.
Signed-off-by: Stefan Leichter <Stefan.Leichter@camLine.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-02-15 21:30:05 +09:00
Alex Henrie 6e841fdb75 kernel32: Set error if dstlen < 0 in codepage conversion functions.
Signed-off-by: Alex Henrie <alexhenrie24@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-01-25 18:49:49 +09:00
Stefan Leichter 1c3c9f06c5 kernel32: Add stub for GetSystemPreferredUILanguages.
Signed-off-by: Stefan Leichter <Stefan.Leichter@camLine.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-01-19 23:00:51 +09:00
Austin English 5d186034c1 kernel32: Make CompareStringEx semi-stub flag FIXME only show once.
Signed-off-by: Austin English <austinenglish@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2015-12-24 12:04:05 +01:00
Jacek Caban 6a7363b694 kernel32: Call registry functions with full key path.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2015-11-19 23:56:39 +09:00
Nikolay Sivov 982c3ede72 kernel32: GetLocaleInfoA() doesn't support LOCALE_SSHORTTIME.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2015-11-11 00:07:43 +09:00
Daniel Lehman 5bf1423c2c kernel32: Return LOCALE_INVARIANT from ConvertDefaultLocale. 2015-08-25 17:41:35 +09:00
Jacek Caban 09176c3aa0 kernel32: Treat empty locale name as LOCALE_INVARIANT. 2015-06-10 15:00:15 +09:00
Christian Faure 9cffed782f kernel32: Fix a crash in GetStringTypeW() on NULL input string. 2015-05-18 14:07:48 +09:00
Mark Harmstone e468f15d20 kernel32: Add GetFileMUIInfo stub. 2015-05-12 15:30:47 +09:00
Mark Harmstone ed0c6746dd kernel32: Stub out GetFileMUIPath. 2015-04-06 12:49:03 +09:00
Sebastian Lackner 51c21cca98 kernel32: Fix calculation of returned buffer in get_registry_locale_info.
Fixes a regression introduced by 8826ba1bc8.
2015-04-06 12:06:18 +09:00
Frédéric Delanoy f6a341c747 Assorted spelling/grammar fixes. 2015-03-27 22:29:48 +09:00
Alex Henrie 6bcf9e4bd8 kernel32: Support UTF-7 in MultiByteToWideChar.
Portions of utf7_mbstowcs were written by Sebastian Lackner.
2015-02-09 20:41:42 +09:00
Alex Henrie 054fa77de0 kernel32: Support UTF-7 in WideCharToMultiByte.
Portions of utf7_wcstombs were written by Sebastian Lackner.
2015-02-09 20:37:27 +09:00
Sebastian Lackner 8826ba1bc8 kernel32: Return proper char count in get_registry_locale_info. 2014-12-16 13:32:53 +01:00
Austin English 76dc45aa1a kernel32: Add a stub for GetUserPreferredUILanguages. 2014-12-10 19:32:28 +01:00