Skip to content

bugfix SUBLANG_DEFAULT #7613

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions ext/com_dotnet/com_extension.c
Original file line number Diff line number Diff line change
Expand Up @@ -245,6 +245,7 @@ PHP_MINIT_FUNCTION(com_dotnet)
COM_CONST(VARCMP_GT);
COM_CONST(VARCMP_NULL);
COM_CONST(LOCALE_SYSTEM_DEFAULT);
COM_CONST(LOCALE_NEUTRAL);

COM_CONST(NORM_IGNORECASE);
COM_CONST(NORM_IGNORENONSPACE);
Expand Down
4 changes: 2 additions & 2 deletions ext/com_dotnet/com_handlers.c
Original file line number Diff line number Diff line change
Expand Up @@ -326,7 +326,7 @@ static zend_function *com_method_get(zend_object **object_ptr, zend_string *name

if (SUCCEEDED(ITypeInfo_GetTypeComp(obj->typeinfo, &comp))) {
olename = php_com_string_to_olestring(name->val, name->len, obj->code_page);
lhash = LHashValOfNameSys(SYS_WIN32, LOCALE_SYSTEM_DEFAULT, olename);
lhash = LHashValOfNameSys(SYS_WIN32, LOCALE_NEUTRAL, olename);

if (SUCCEEDED(ITypeComp_Bind(comp, olename, lhash, INVOKE_FUNC, &TI, &kind, &bindptr))) {
switch (kind) {
Expand Down Expand Up @@ -410,7 +410,7 @@ static int com_objects_compare(zval *object1, zval *object2)
obja = CDNO_FETCH(object1);
objb = CDNO_FETCH(object2);

switch (VarCmp(&obja->v, &objb->v, LOCALE_SYSTEM_DEFAULT, 0)) {
switch (VarCmp(&obja->v, &objb->v, LOCALE_NEUTRAL, 0)) {
case VARCMP_LT:
ret = -1;
break;
Expand Down
2 changes: 1 addition & 1 deletion ext/com_dotnet/com_iterator.c
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ zend_object_iterator *php_com_iter_get(zend_class_entry *ce, zval *object, int b
} else {
/* can we enumerate it? */
if (FAILED(IDispatch_Invoke(V_DISPATCH(&obj->v), DISPID_NEWENUM,
&IID_NULL, LOCALE_SYSTEM_DEFAULT, DISPATCH_METHOD|DISPATCH_PROPERTYGET,
&IID_NULL, LOCALE_NEUTRAL, DISPATCH_METHOD|DISPATCH_PROPERTYGET,
&dp, &v, NULL, NULL))) {
goto fail;
}
Expand Down
2 changes: 1 addition & 1 deletion win32/winutil.c
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ PHP_WINUTIL_API char *php_win32_error_to_msg(HRESULT error)

DWORD ret = FormatMessageW(
FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS,
NULL, error, MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), (LPWSTR)&bufw, 0, NULL
NULL, error, MAKELANGID(LANG_NEUTRAL, SUBLANG_NEUTRAL), (LPWSTR)&bufw, 0, NULL
);

if (!ret || !bufw) {
Expand Down