Regarding the NWC2 installer/updater on Wine, I added the following to your Wine report:
The "diff -u" for font.c is as follows (we will e-mail it to the Wine folks):
--- orig-font.c Mon Jan 8 07:27:52 2007
+++ font.c Mon Jan 8 07:30:55 2007
@@ -349,9 +349,9 @@
* the number of WCHARs that have been written. The caller should free
* the returned LPWSTR from the process heap itself.
*/
-static LPWSTR FONT_mbtowc(LPCSTR str, INT count, INT *plenW)
+static LPWSTR FONT_mbtowc(HDC hdc, LPCSTR str, INT count, INT *plenW)
{
- UINT cp = CP_ACP;
+ UINT cp = (GetTextCharset(hdc) == SYMBOL_CHARSET) ? CP_SYMBOL : CP_ACP;
INT lenW;
LPWSTR strW;
@@ -1022,7 +1022,7 @@
{
BOOL ret = FALSE;
INT wlen;
- LPWSTR p = FONT_mbtowc(str, count, &wlen);
+ LPWSTR p = FONT_mbtowc(hdc, str, count, &wlen);
if (p) {
ret = GetTextExtentPoint32W( hdc, p, wlen, size );
@@ -1131,7 +1131,7 @@
NULL == (walpDx = HeapAlloc(GetProcessHeap(), 0, count * sizeof(INT))))
return FALSE;
- p = FONT_mbtowc(str, count, &wlen);
+ p = FONT_mbtowc(hdc, str, count, &wlen);
ret = GetTextExtentExPointW( hdc, p, wlen, maxExt, lpnFit, walpDx, size);
if (walpDx)
{
@@ -1648,7 +1648,7 @@
for(i = 0; i < count; i++)
str[i] = (BYTE)(firstChar + i);
- wstr = FONT_mbtowc(str, count, &wlen);
+ wstr = FONT_mbtowc(hdc, str, count, &wlen);
for(i = 0; i < wlen; i++)
{
@@ -1683,7 +1683,7 @@
if (flags & ETO_GLYPH_INDEX)
return ExtTextOutW( hdc, x, y, flags, lprect, (LPCWSTR)str, count, lpDx );
- p = FONT_mbtowc(str, count, &wlen);
+ p = FONT_mbtowc(hdc, str, count, &wlen);
if (lpDx) {
unsigned int i = 0, j = 0;
@@ -2295,7 +2295,7 @@
for(i = 0; i < count; i++)
str[i] = (BYTE)(firstChar + i);
- wstr = FONT_mbtowc(str, count, &wlen);
+ wstr = FONT_mbtowc(hdc, str, count, &wlen);
for(i = 0; i < wlen; i++)
{
@@ -2433,7 +2433,7 @@
len = 1;
mbchs[0] = (uChar & 0xff);
}
- p = FONT_mbtowc(mbchs, len, NULL);
+ p = FONT_mbtowc(hdc, mbchs, len, NULL);
c = p[0];
} else
c = uChar;
@@ -2739,7 +2739,7 @@
TRACE("(%p, %s, %d, %p, 0x%x)\n",
hdc, debugstr_an(lpstr, count), count, pgi, flags);
- lpstrW = FONT_mbtowc(lpstr, count, &countW);
+ lpstrW = FONT_mbtowc(hdc, lpstr, count, &countW);
ret = GetGlyphIndicesW(hdc, lpstrW, countW, pgi, flags);
HeapFree(GetProcessHeap(), 0, lpstrW);
@@ -2791,7 +2791,7 @@
/* both structs are equal in size */
memcpy(&resultsW, lpResults, sizeof(resultsW));
- lpStringW = FONT_mbtowc(lpString, uCount, &uCountW);
+ lpStringW = FONT_mbtowc(hdc, lpString, uCount, &uCountW);
if(lpResults->lpOutString)
resultsW.lpOutString = HeapAlloc(GetProcessHeap(), 0, sizeof(WCHAR)*uCountW);
@@ -2931,7 +2931,7 @@
for(i = 0; i < count; i++)
str[i] = (BYTE)(first + i);
- wstr = FONT_mbtowc(str, count, &wlen);
+ wstr = FONT_mbtowc(hdc, str, count, &wlen);
for (i = 0; i < wlen; i++)
{