Closed Bug 280238 Opened 20 years ago Closed 20 years ago

WINCE intl changes

Categories

(Firefox Build System :: General, defect)

x86
Windows XP
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: dougt, Assigned: dougt)

References

Details

(Keywords: intl)

Attachments

(1 file, 1 obsolete file)

needed to make a few changes to get intl to compile and work on wince
Attached patch patch v.1 (obsolete) — Splinter Review
Attachment #172721 - Flags: review?(dveditz)
Blocks: 277211
+  if (GetLocaleInfoW(localeAsLCID, LOCALE_IDEFAULTANSICODEPAGE, acp_name,
sizeof(acp_name))==0) { 

hm, won't this break on windows 9x?
Yes, it will. GetLocaleInfoW is not available natively on Win 9x/ME (unless MSLU
is present, which we can't take it granted) . See

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/mslu/winprog/other_existing_unicode_support.asp
 
+#ifndef WINCE //Always use wide.

This comment is a bit confusing. How about 'Always use wide APIs on Win CE' or
more verbose 'Need to check the presence of W APIs unless on Win CE'? 


Keywords: intl
Attached patch patch v.2Splinter Review
thanks for the input.  How about something like this?
Attachment #172721 - Attachment is obsolete: true
Attachment #172801 - Flags: review?(jshin1987)
Comment on attachment 172801 [details] [diff] [review]
patch v.2


>+#ifndef WINCE // Always use wide.
>   if (strength == kCollationCaseInSensitive)
>     dwMapFlags |= NORM_IGNORECASE;

Shouldn't the above |#ifndef WINCE| come here (unless NORM_IGNORECASE is not
supported on WinCE)? With that taken care of, r=jshin

>   if (mW_API) {
>-    retval = CompareStringW(mLCID, dwMapFlags,
>-                            (LPCWSTR) PromiseFlatString(string1).get(), -1,
>-                            (LPCWSTR) PromiseFlatString(string2).get(), -1);
>+#endif
>+    retval = ::CompareStringW(mLCID, 
>+                              dwMapFlags,
>+                              (LPCWSTR) PromiseFlatString(string1).get(), 
>+                              -1,
>+                              (LPCWSTR) PromiseFlatString(string2).get(), 
>+                              -1);
Attachment #172801 - Flags: review?(jshin1987) → review+
Checking in locale/src/windows/nsCollationWin.cpp;
/cvsroot/mozilla/intl/locale/src/windows/nsCollationWin.cpp,v  <-- 
nsCollationWin.cpp
new revision: 1.46; previous revision: 1.45
done
Checking in locale/src/windows/nsDateTimeFormatWin.cpp;
/cvsroot/mozilla/intl/locale/src/windows/nsDateTimeFormatWin.cpp,v  <-- 
nsDateTimeFormatWin.cpp
new revision: 1.44; previous revision: 1.43
done

Thanks for the review.
Status: NEW → RESOLVED
Closed: 20 years ago
Resolution: --- → FIXED
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/wceddk/html/wceddkcomparestring.asp
According to the above page, NORM_IGNORECASE is supported on WinCE 3.0

dwCmpFlags
    Indicate how this function compares the two strings. The SORT_STRINGSORT
flag is assumed and cannot be disabled. The NORM_IGNORECASE flag can be added as
an option to ignore differences between uppercase and lowercase characters in
the two strings.

Even if it doesn't, we have to do that on our own (using ToUppercase, etc). I
should have pointed that out in my review.
the docs also state:

This API is part of the complete Windows CE OS package as provided by Microsoft.
The functionality of a particular platform is determined by the original
equipment manufacturer (OEM) and some devices may not support this API.

Last I checked, this wasn't in the pocket pc 2003 sdk.
Attachment #172721 - Flags: review?(dveditz)
> Even if it doesn't, we have to do that on our own (using ToUppercase, etc). I
> should have pointed that out in my review.

Your reply didn't address the above issue. 'Case-insesitive' collation needs to
be 'approximated' if not supported by the OS. bug 282539 was filed on the issue.
must have missed that comment.  thanks for spawning the new bug.
Product: Core → Firefox Build System
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: