Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
6549f1f3
Commit
6549f1f3
authored
Mar 29, 2022
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
kernelbase: Reimplement LOCALE_SSORTNAME in GetLocaleInfoW/Ex.
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
d39c6851
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
79 additions
and
1 deletion
+79
-1
locale.c
dlls/kernelbase/locale.c
+79
-1
No files found.
dlls/kernelbase/locale.c
View file @
6549f1f3
...
...
@@ -925,11 +925,88 @@ static int locale_return_strarray_concat( DWORD pos, LCTYPE type, WCHAR *buffer,
}
/* FIXME: hardcoded, sortname is apparently not available in locale.nls */
static
const
WCHAR
*
get_locale_sortname
(
LCID
lcid
)
{
switch
(
PRIMARYLANGID
(
lcid
))
{
case
LANG_CHINESE
:
switch
(
SORTIDFROMLCID
(
lcid
))
{
case
SORT_CHINESE_PRCP
:
switch
(
SUBLANGID
(
lcid
))
{
case
SUBLANG_CHINESE_TRADITIONAL
:
case
SUBLANG_CHINESE_HONGKONG
:
case
0x1f
:
return
L"Stroke Count"
;
default:
return
L"Pronunciation"
;
}
case
SORT_CHINESE_UNICODE
:
return
L"Unicode"
;
case
SORT_CHINESE_PRC
:
return
L"Stroke Count"
;
case
SORT_CHINESE_BOPOMOFO
:
return
L"Bopomofo"
;
case
SORT_CHINESE_RADICALSTROKE
:
return
L"Radical/Stroke"
;
case
5
:
return
L"Surname"
;
}
break
;
case
LANG_GEORGIAN
:
if
(
SORTIDFROMLCID
(
lcid
)
==
SORT_GEORGIAN_MODERN
)
return
L"Modern"
;
return
L"Traditional"
;
case
LANG_GERMAN
:
switch
(
SUBLANGID
(
lcid
))
{
case
SUBLANG_NEUTRAL
:
case
SUBLANG_DEFAULT
:
if
(
SORTIDFROMLCID
(
lcid
)
==
SORT_GERMAN_PHONE_BOOK
)
return
L"Phone Book (DIN)"
;
return
L"Dictionary"
;
}
break
;
case
LANG_HUNGARIAN
:
if
(
SORTIDFROMLCID
(
lcid
)
==
SORT_HUNGARIAN_TECHNICAL
)
return
L"Technical"
;
break
;
case
LANG_INVARIANT
:
if
(
SORTIDFROMLCID
(
lcid
)
==
SORT_INVARIANT_MATH
)
return
L"Default"
;
return
L"Maths Alphanumerics"
;
case
LANG_JAPANESE
:
switch
(
SORTIDFROMLCID
(
lcid
))
{
case
SORT_JAPANESE_XJIS
:
return
L"XJIS"
;
case
SORT_JAPANESE_UNICODE
:
return
L"Unicode"
;
case
SORT_JAPANESE_RADICALSTROKE
:
return
L"Radical/Stroke"
;
}
break
;
case
LANG_KOREAN
:
if
(
SORTIDFROMLCID
(
lcid
)
==
SORT_KOREAN_UNICODE
)
return
L"Unicode"
;
return
L"Dictionary"
;
case
LANG_SPANISH
:
switch
(
SUBLANGID
(
lcid
))
{
case
SUBLANG_NEUTRAL
:
case
SUBLANG_SPANISH_MODERN
:
return
L"International"
;
case
SUBLANG_DEFAULT
:
return
L"Traditional"
;
}
break
;
}
return
L"Default"
;
}
/* get locale information from the locale.nls file */
static
int
get_locale_info
(
const
NLS_LOCALE_DATA
*
locale
,
LCID
lcid
,
LCTYPE
type
,
WCHAR
*
buffer
,
int
len
)
{
static
const
WCHAR
spermille
[]
=
{
0x2030
,
0
};
/* this one seems hardcoded */
const
WCHAR
*
sort
;
UINT
val
;
if
(
locale
!=
user_locale
)
type
|=
LOCALE_NOUSEROVERRIDE
;
...
...
@@ -1312,7 +1389,8 @@ static int get_locale_info( const NLS_LOCALE_DATA *locale, LCID lcid, LCTYPE typ
return
locale_return_number
(
locale
->
idefaultebcdiccodepage
,
type
,
buffer
,
len
);
case
LOCALE_SSORTNAME
:
return
-
1
;
sort
=
get_locale_sortname
(
lcid
);
return
locale_return_data
(
sort
,
wcslen
(
sort
)
+
1
,
type
,
buffer
,
len
);
case
LOCALE_IDIGITSUBSTITUTION
:
return
locale_return_number
(
locale
->
idigitsubstitution
,
type
,
buffer
,
len
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment