Hi Steven,
After doing more testing with issue #2 below i've found that when the
document opens as an attachment in the new window, the encoding always
defaults to Western European (Windows) -- even after the default setting in
IE under View/Encoding is set to UTF-8. In the new window once the document
has opened, if i change the encoding to UTF-8, the Wingding font (a checkbox
symbol) is displayed correctly. However, this is a pain to require the
user's to do this each time. Is there a way to ensure the new window opens
using UTF-8?
thanks,
Brian
"Brian Paul" <brianp@ekyros.com> wrote in message
news:OfQxUMKyDHA.1680@TK2MSFTNGP12.phx.gbl...[color=blue]
> Hi Steven,
>
> Thanks very much for your time on this. I sure appreciate it your[/color]
support.[color=blue]
> You found the problem to #2. See my responses in CAPS inline below:
>
> thanks again!!!
>
> "MSFT" <v-schang@online.microsoft.com> wrote in message
> news:3YoG3bFyDHA.3532@cpmsftngxa07.phx.gbl...[color=green]
> > Hi Brian Paul,
> >
> >
> > Thank you for using Microsoft Newsgroup service. Based on your[/color]
> description,[color=green]
> > you had a aspx page to provide a certain format html document for the[/color][/color]
user[color=blue][color=green]
> > to open in browsr or download to client. The html document has some
> > "printer-friendly" data( are they all unicode data?). Also, you set the
> > page's Header as
> > Response.AppendHeader("Content-Disposition",
> > String.Format("attachment;Filename=\"{0}\"", "Document1.htm")); to force
> > the download dialog to popup and set the charset as "UTF-8"
> >
> > However, when you run the page and fire the download operation, you
> > encountered two problems:
> > 1. the download dialog popup twice
> > 2. some of the html document's data doesn't display correctly
> >
> > Please correct me if my understanding or your problem is not quite[/color]
> accurate.[color=green]
> >
> > As for the above two problems I've done some tested on them. I also met[/color]
> the[color=green]
> > first problem, it is a bit strange why the dialog popup twice. I'll do[/color]
> some[color=green]
> > further research on it and I also find a way to workaround the problem:
> > Just using another page to render the document output which will be
> > downloaded or opened. Add the "render" method in this page.
> >
> > In the original page, just use a simple hyperlink which point to[/color][/color]
document[color=blue][color=green]
> > page, such as
> > <a href="showdoc.aspx">open document</a>
> >
> > the "showdoc.aspx" is just the page which has the "render? method to
> > generate the "printer-friendly data and show download dialog.
> > Thus, the pop dialog won't popup twice.
> >[/color]
> THANKS FOR THE SUGGESTION, HOWEVER, IT'S A LOT MORE WORK THAN MY CURRENT
> IMPLEMENTATION.
>
> HERE'S WHY:
>
> IN MOST CASES DATAGRIDS ARE THE CONTROLS TO BE RENDERED ON EACH PAGE. THE
> PAGE ALLOWS FILTERS TO BE SET FOR THE DATAGRID. YOU CAN ALSO SORT THE[/color]
DATA[color=blue]
> BY CLICKING ON THE HEADER COLUMN WITHIN EACH DATAGRID.
>
> USING A SEPERATE PAGE REQUIRES ME TO PASS ALL THE FILTER AND SORT PARAMS[/color]
TO[color=blue]
> THE 2ND PAGE AND RE-DATABIND ALL THE GRID(S) (REQUIRING ANOTHER ROUND TRIP
> TO THE DB).
>
> USING THE SAME PAGE IS MUST SIMPLER AND EFFICIENT. I DON'T HAVE TO SEND[/color]
ALL[color=blue]
> THE PAGE PARAMS, AND I DON'T EVEN HAVE TO RE-DATABIND THE GRIDS. I JUST[/color]
ADD[color=blue]
> THE GRID TO THE RENDER FUNCTION OF THE PARENT PAGE AND THE GRID(S) ARE
> RENDERED BASED ON THEIR CURRENT VIEWSTATE.
>
> IF AT ALL POSSIBLE, I WOULD LIKE TO STAY WITH THE SINGLE PAGE
> IMPLEMENTATION.
>
> -----
> AFTER MORE INITIAL TESTING I HAVE FOUND THAT SOME VERSIONS OF IE6 ON WINXP
> DON'T PROMPT TWO DIALOGS. THE IE VERSIONS ARE THE SAME, BUT ONE HAS MORE
> UPDATES:
>
> THIS ONE PROMPTS TWICE:
> IE VERSION ON WINXP: 6.0.2800.1106.XPSP2.030422-1633
> UPDATES: SP1, Q328970, Q324929, Q810847, Q813951, Q813489, Q330994,[/color]
Q818529,[color=blue]
> Q822925, Q828750, 824145
>
> THIS ONE PROMPTS ONCE:
> IE VERSION ON WINXP: 6.0.2800.1106.XPSP2.030422-1633
> UPDATES: SP1, Q810847, Q813951, Q813489, Q330994, Q818529, Q822925,[/color]
Q828750,[color=blue]
> 824145
> IT DOES NOT INCLUDE: Q328970, Q324929 ....SO MAYBE IT HAS SOMETHING TO DO
> WITH ONE OF THESE UDPATES.[color=green]
> >
> > As for the second problem. You said that " the encoding of the page is[/color][/color]
set[color=blue][color=green]
> > to Western European (Windows) versus UTF-8" and some "wingding fonts "
> > doesn't display correctly. Do you means that when the document is[/color][/color]
opended[color=blue][color=green]
> > in the browser, the Encoding of the browser is set as "western European"
> > rather than "UTF-8"?[/color]
>
> YES, THAT IS CORRECT.
>
> And if you change the browser's view->encoding to[color=green]
> > "UTF-8", does those "wingding fonts " display correctly?[/color]
>
> YES, THAT FIXED IT!!!! ONE QUESTION THOUGH, OUT OF THE BOX, WHAT IS IE'S
> DEFAULT ENCODING? I DON'T RECALL CHANGING THIS SETTING ON ANY OF OUR TEST
> MACHINES.
>[color=green]
> > If it can display correctly when you set the browser's view->encoding as
> > "UTF-8", the problem is caused by the client browser's default encoding
> > setting. Since the default encoding of the client browser is set as
> > "western European", when you open a certain page in the browser, it will
> > always first display using the default setting. This feature is not set[/color]
> via[color=green]
> > the serverside code.
> >
> > If the "wingding fonts" still can't display correctly when you chang the
> > browsesr's view->encoding to "UTF-8", I think the problem is likely due[/color][/color]
to[color=blue][color=green]
> > the "wingding fonts" which can't display well in UTF-8. Thus, would you
> > please provide some of the "wingding fonts" which can't display well so
> > that I can do further research on them?
> >
> >
> > Please try out the preceding suggestion to see whether it helps. Also if
> > you have any questions on it, please feel free to let me know.
> >
> >
> > Steven Cheng
> > Microsoft Online Support
> >
> > Get Secure!
www.microsoft.com/security
> > (This posting is provided "AS IS", with no warranties, and confers no
> > rights.)
> >[/color]
>
>[/color]