Closed Bug 50795 Opened 24 years ago Closed 24 years ago

Non-ASCII characters are not printed out on Win95.

Categories

(Core :: Internationalization, defect, P2)

x86
Windows 95
defect

Tracking

()

VERIFIED FIXED

People

(Reporter: ji, Assigned: dcone)

References

Details

(Whiteboard: [rtm++][nsbeta3-][PDTP2]super-reviewed, reviewed)

Attachments

(3 files)

*****observed with win32 2000-08-30-08 build ******

Any strings which contain non-ASCII chars cann't be printed out.

Steps to reproduce:
1. Launch browser.
2. Go to http://home.netscape.com/fr or http://home.netscape.com/ja
3. Select File | Print

The strings on the web page which contain non-ASCII chars are not printed out.
Is this a Win95 specific problem or a regression starting today?
I used the same build on WinNT US and I was able to print the pages.
http://home.netscape.com/fr
http://home.netscape.com/ja
http://www.yahoo.co.jp

Does PR2 print on Win95?
Gary's En win98 and my Ja WinNT don't have this problem. It looks like a Win95 
specific problem. Even Ja PR2 does't print out non-ASCII chars.
Does this happen with Win95 US?
Keywords: nsbeta3
On my En Win95, both Ja PR2 and 2000-08-31-09 build crash when printing out 
Netcenter French and Japanese page. 
Xianglan, could you attach talkback data for the crash?
actually, I'm using Japanese win 98, not US win 98.
I don't get talkback report either with PR2 crash or latest build crash.
I tested this in 2000-08-30-09 Win32 build in Win95US.  I could print out 
French netcenter page and English netcenter page.  The machine has Japanese 
fonts. I got the same problem which Xianglan found.
Crashing might be related to bug 50366 or bug 50816.
Reassign to the ownver of printing, the bug can be reproduced by printing the 
French page http://home.netscape.com/fr on US Win95.
Assignee: nhotta → dcone
Severity: normal → major
Priority: P3 → P1
Summary: Non-ASCII characters are not printed out. → Non-ASCII characters are not printed out on Win95.
I would like to make clear my previous mail.
I can print out the following pages without any problems in 2000-08-30-08 with 
Win95US.
http://home.netscape.com/fr/
http://home.netscape.com/de/
http://home.netscape.com

I could print http://home.netscape.com/ja page, but the Japanese characters are
printed as "--".  The Win95 US machine I used for this has Japanese fonts 
installed.

Status: NEW → ASSIGNED
Target Milestone: --- → Future
Marking nsbeta3-. Just not enough time to fix this problem before beta3.
Whiteboard: [nsbeta3-]
This cannot be latered, we cannot ship without printing non-ASCII on Win95. 
Kevin, how can we help you? removing the minus
Whiteboard: [nsbeta3-]
From Teruko's comment on 2000-08-31 14:28 it sounds like only Japanese fonts are 
the problem, not all ascii characters.



Xianglan said before it also happens with French. Xianglan, can you confirm? 
Marina can read French. In any case, "only Japanese" is our second market...
                                                                   
erik@netscape.com:  Do you have any ideas on why this would fail for WIN95 only?
Win95 users won't be able to print out Japanese pages
either using a Japanese win95 or English Win95 with Japanese fonts. 
And also Japanese win95 users not only can't print out Japanese pages, 
but also can't print out latin-1 pages, like French, German.
So this problem will affect Japanese win95 users most. To them, printing
any non-ASCII web pages (including Ja and European) is impossible.
A possible cause is when you use ExtTextOutW to display a character that is in 
the unicode range but not in the particular codepage with which the font file is 
associated, a blank character is displayed. This is a difference between WIN95 
and WINNT. During printing metrics ::RealizeFont uses a different DC when 
realizing the font during printing. Perhaps the DC it is using specifies a 
different code page?

nsresult
2704 nsFontMetricsWin::RealizeFont()
2705 {
2706 nsresult res;
2707 HWND  win = NULL;
2708 HDC   dc = NULL;
2709 HDC   dc1 = NULL;
2710 
2711   
2712   if (NULL != mDeviceContext->mDC){
2713     // XXX - DC If we are printing, we need to get the printer HDC and a 
screen HDC
2714     // The screen HDC is because there seems to be a bug or requirment that 
the 
2715     // GetFontData() method call have a screen HDC, some printers HDC's 
return nothing
2716     // thats will give us bad font data, and break us.  
2717     dc = mDeviceContext->mDC;
2718     win = (HWND)mDeviceContext->mWidget;
2719     dc1 = ::GetDC(win);
2720   } else {
2721     // Find font metrics and character widths
2722     win = (HWND)mDeviceContext->mWidget;
2723     dc = ::GetDC(win);
2724     dc1 = dc;
2725   }

I.E 5 behaves exactly the same as N6.

On WIN95 I.E. 5.0 also prints dots for the Japanese characters.
On WINNT I.E. 5.0 prints the Japanese characters.

I think the difference is in the font support beween WIN95 and WINNT. On WINNT 
it must be capable of downloading the japanese font to the printer, while WIN95 
must require the font be installed on the printer.

I think this bug is probably INVALID. You need to have Japanese fonts installed 
on the printer for WIN95 to work. Does anyone have a printer with Japanese 
fonts that they can test this with?.

Reassigning to myself
Assignee: dcone → kmcclusk
Status: ASSIGNED → NEW
I see Teruko has tried it with a printer with Japanese fonts installed. Teruko, 
does it print correctly from I.E. when sending it to the printer with Japanese 
fonts on WIN95?
Marking nsbeta3- for now. 

If we can confirm that other applications are able to print Japanese Fonts on 
WIN95, but N6 can't then clear the nsbeta3- for reconsideration. 
Whiteboard: [nsbeta3-]
> If we can confirm that other applications are able to print Japanese Fonts on 
> WIN95
If this is talking about printing Japanese on Win95-J, I am sure this is true. 
Nobody in Japan would use Win95-J if Japanese printing is not supported.
I tested this with 2000-09-15-05 Win32 build in Win95J.  
IE 5.0 does not print http://home.netscape.com/ja correctly.  I did not see the
dots.  Japanese characters are printed, but all characters are printed.

I answer the Kevin McCluskey question. "You need to have Japanese fonts 
installed on the printer for WIN95 to work. Does anyone have a printer with 
Japanese fonts that they can test this with?."
We do not have any printers installed Japanese fonts.  We send printer from 
Netscape6 in Win95J, then the printer will print Japanese characters.

I printed the following URLs in same build.
http://home.netscape.com/es/
http://home.netscape.com/fr/
Both Spanish and French pages are not printed correctly, either.
"I tested this with 2000-09-15-05 Win32 build in Win95J.  
IE 5.0 does not print http://home.netscape.com/ja correctly.  I did not see the
dots.  Japanese characters are printed, but all characters are printed."

Teruko: are you saying that I.E 5.0  Does print http://home.netscape.com/ja 
correctly, but N6 does not on WIN95-J?

removing the minus again; regardless of Ja fonts, accented characters in Spanish 
or French are not printing out either. Kevin, is there a way we could show you 
the printing results?
Whiteboard: [nsbeta3-]
msanz: The main problem I'm having is figuring out what OS where having the 
problem with. The bug reports talks of problems on WIN95 US with Japanese fonts 
+ WIN95J and the fact that it works ok on WINNT.

As far as I can tell we work on fine on WINNT and WIN95 US. On WIN95 US with 
Japanese fonts we don't print the Japanese Characters, but neither does I.E. 

I haven't tried WIN95J. Am I correct to assume this problem is specific to 
WIN95-J?  Does I.E print the page correctly on WIN95-J?

Should the summary be changed to:

Non-ASCII characters are not printed out on Win95J?
>I haven't tried WIN95J. Am I correct to assume this problem is specific to 
>WIN95-J?  Does I.E print the page correctly on WIN95-J?

As you also found out, on English Win95 + Japanese fonts we don't print out 
Japanese pages, although we can print out French and German pages in this 
environment. It's not a win95-J specific problem. Users on English Win95 who 
know Japanese can't print out Japanese pages even they can read from browser.

IE 5 can print out Japanese pages correctly on WIN95-J.

>Should the summary be changed to:

>Non-ASCII characters are not printed out on Win95J?

Again, we can't print Japanese pages on English Win95 + Japanese fonts.
I'd like to leave the summay this way.
"As you also found out, on English Win95 + Japanese fonts we don't print out 
Japanese pages, although we can print out French and German pages in this 
environment."

Can any application print Japanese fonts with WIN95+Japanese fonts system? I.E 
5.0 can not. My guess is that many printers contain support for French and 
German character sets, but unless you have Japanese fonts support on the printer  
you can not print from WIN95 US even if you have installed Japanese fonts for 
the display. My clue is that Even I.E 5.0 which is application that coordinates 
the installation of the Japanese fonts can NOT print them out. If the printer 
driver does not support downloading of the glyphs to the printer there is 
nothing we can do to make N6 support printing of Japanese characters.

WIN95J probably may contains special printer drivers which allows the glphs to 
be downloaded to the printer. If IE 5.0 prints Japanese characters correctly on 
IN95J then thats a clue that it is at least possible.
chrisd@netscape.com: Can we get a copy of WIN95J so I can reproduce this bug?
Marking nsbeta3+ because it does not print non-ascii characters on WIN95J 
(Japanese version). 
Status: NEW → ASSIGNED
Whiteboard: [nsbeta3+]
Setting priority to P2
Priority: P1 → P2
We have WIN95J installed on a machine here, but I can't get it to print the 
Japanese glyphs in either I.E or any other App. We did a standard install, but 
none of us know Japanese here, so we may have missed something. Is there 
something special we have to do after installing. I'm trying to print on a HP 
laserjet4 printer.
PDT agrees P2
Whiteboard: [nsbeta3+] → [nsbeta3+][PDTP2]
do you get any messages at all when trying to print? If you send us screenshots 
we can translate for you.
For each string we output to the printer we are going to try converting from 
Unicode to the system charset and pass the converted charset string to the WIN32 
GDI calls.  Once we have done this will need someone to test a new gfx dll on a 
WIN95J system that is known to print to see if that fixes the problem.
Kevin, on Win95J, we are already converting from Unicode to whatever code pages
are supported by the font (in the nsRenderingContextWinA and nsFontMetricsWinA
subclasses, which call the ExtTextOutA function as opposed to ExtTextOutW). As
far as I know, we are using the same code path when printing. The only(?)
difference is that we are using a DC for printing, right?
Erik: I didn't realize we were already doing the conversion for WIN95J. I wonder 
why we can 't print the Japanese Characters? As you said, the only difference 
between printing and display is that we use a printer DC instead of screen DC.

Reassigning to dcone, since he is looking at the problem now.
Assignee: kmcclusk → dcone
Status: ASSIGNED → NEW
I put in code that outputs if we use a ExtTextOutA or a ExtTextOutW or a
ExtTextOut (nsRenderingContextWin).  Seems all were called at one point or 
another.. but I ran these tests on NT both display and printer.  I would like to  
run the tests (viewer) on this Japanese Win95 machine, both printing and 
displaying to see if it can give information or fix the problem.  I mapped all 
the ExtTextOutW calls to a ExtTextOutA call. 
Status: NEW → ASSIGNED
Not holding PR3 for this. Marking nsbeta3- but adding rtm nomination
Keywords: rtm
Whiteboard: [nsbeta3+][PDTP2] → [nsbeta3-][PDTP2]
Marking rmt+. Setting to M19
Whiteboard: [nsbeta3-][PDTP2] → [rtm+][nsbeta3-][PDTP2]
Target Milestone: Future → M19
Marking [rtm need info] Waiting for patch to be attached, review + super-review.
Whiteboard: [rtm+][nsbeta3-][PDTP2] → [rtm need info][nsbeta3-][PDTP2]
I may have a fix.. but I don't have anyway to test this.  Is there someone who 
has this problematic setup, and I will share out my disk and you can download...
the application.  Even better is if you can compile the change and see if things 
clear up. 
Hi Don, would you please attach the fix to this bug report? I'd like to look at
it and maybe get it tested over here.
Hi Don, I left you a voice mail, but you can tell us where to use the build from
and we can test it here before you check it in.
Can someone try this patch and let me know if this works.
In your patch, you didn't check the rv after the CreateInstance. I think you
should at least add

NS_ASSERTION(NS_SUCCEEDED(rv), "cannot create rendering context");

Ok... if someone runs with this patch and comfirms the fix.. I promise to put 
the rv check in.
Erik- can you try this patch and run it ?
nice catch on this one!  I wish the constructor for the rendering context had
been protected, so this couldn't have happened.  Oh well, next time...
Minor point:  almost always, you should use the NS_SUCCEEDED macro instead of
checking for NS_OK.  This mistake is made in lots of places in our code, I just
hate to see it propogated further.
a=buster
Low risk, very high value, suggest rtm++.
Patch looks good.
r=kmcclusk@netscape.com

Marking rtm+.
Simple low risk fix, which will fix printing on WIN95J.

Adding super-reviewed, reviewed to status line.
Whiteboard: [rtm need info][nsbeta3-][PDTP2] → [rtm+][nsbeta3-][PDTP2]super-reviewed, reviewed
Tried dcone's first patch on my win95-J, I can print out Japanese, Chinese, 
French and German Netcenter pages w/o any problems.
Since we are now creating the rendering context with CreateInstance instance of
"new", do we still want to NS_ADDREF it after creating it? I think this is a
leak.
Tested dcone's patch on my win95-J (B), I can print out Japanese, Chinese, 
French and German Netcenter pages without any problems.
PDT marking [rtm++]
Whiteboard: [rtm+][nsbeta3-][PDTP2]super-reviewed, reviewed → [rtm++][nsbeta3-][PDTP2]super-reviewed, reviewed
Blocks: 55824
Fixed
Status: ASSIGNED → RESOLVED
Closed: 24 years ago
Resolution: --- → FIXED
I tested this in 2000-10-10-09 MN6 build on Win95J.  I can print Japanese, Chinese page
correctly.  However, after I print several pages, the Windows 95J system will shut down completely.
This is very bad behavior.  I tested this on Win95J (A) and Win95J (B).  Reopening.
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Don, did you remove the NS_ADDREF before checking in?. The extra NS_ADDREF may
be causing a resource leak which is bringing down WIN95J.
I just verified what was checked in on the branch and it is correct. It does not
contain the extra NS_ADDREF.

The crashing is probably a different problem unrelated to fixing printing of
Japanese glyphs.

Teruko: Was it crashing after printing several pages before the fix went in?.
Are the system resources dropping each time you print?
shouldn't you verify this one and open a new one with the new problem. I think
this will be cleaner.
If this was the branch.. Watersons change was not there yet.. so you could have 
run into another printing bug.  I also think that another bug should be opened 
and this one closed if it is printing correctly.  Completly different issues.
Montse, I was not sure the fix was caused another problem when I tried to verity this.  That's why I reopened this.
Since engineer thinks the shut down problem is nothing to do with his fix, I will test more and I will log the other bug.
This is fixed for the original problem.
Status: REOPENED → RESOLVED
Closed: 24 years ago24 years ago
Resolution: --- → FIXED
I could reproduce Windows shut down problem before this fix.  I logged in 56146.
This original bug is fixed in 2000-10-11-08 MN6 and trunk build.
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: