CDhtmlDialog Charset Problem

Hi,

I am using a CDhtmlDialog with a HTML file to show some results in
this dialog.

The HTML file's head portion is given below :-

<HEAD>
<META http-equiv="Content-Type" content="text/html; charset=EUC-JP">
</HEAD>

Note the charset mentioned as EUC-JP.

I am using CDhtmlDialog::LoadFromResource() to load this HTML file in
the CDhtmlDialog dialog. LoadFromResource is invoked from
CDhtmlDialog::OnInitDialog(). Thus when the dialog is created the HTML
file is loaded automatically.

After this loading is done, I am writing some dynamic content in the
HTML file's <DIV> tag (using IHTMLElement::put_innerHTML), and this
content also gets displayed correctly.

Now the problem is that I am having some buffer in a char* variable
and this buffer is encoded in EUC-JP encoding. I am writing this
buffer in the <DIV> tag as mentioned above. But this EUC-JP encoded
buffer is not displayed correctly in the <DIV> tag.

But if I write some EUC-JP encoded string in the HTML file statically,
then this string is displayed properly since LoadFromResource() helps
in correctly recognising the charset during loading of HTML file as
resource. But if I write EUC-JP encoded string dynamically, then
CDhtmlDialog does not interpret it as EUC-JP and thus displays
incorrectly.

Kindly let me know how to solve this issue.

Rajesh
0
3/7/2008 5:02:07 AM
vc.mfc 33608 articles. 0 followers. Follow

0 Replies
646 Views

Similar Articles

[PageSpeed] 59

Reply:

Similar Artilces:

CToolbarCtrl problem
I have created a class derived from CToolbarCtrl. in this class i have added some push buttons and some dropdown buttons.In which one of them is setting button.when i click this button a property sheet is displayed in which i can select and deselect a lot of options about to display a specif button on the toolbar or not. Suppose when the user selects the checkbox of "Mails" and then apply button pressed ,i want to appear that button on the toolbar and if S/He Uncheck the "Mails" checkbox i want to disappear the toolbar Mails button. to solve this problem i have send a user...

Sharing Outlook 2000 calendar problems
Five users are using Outlook 2000, and sharing their Calendars (without Exchange). However, every few days some user's Outlook sends out hundreds of same updates, resulting in their computers eventually crashing and overloading others. Anyone seen this problem? Cheers Jo On 27 Apr 2004 16:04, "jo" <gsc@gol.com> wrote: >Five users are using Outlook 2000, and sharing their Calendars (without >Exchange). However, every few days some user's Outlook sends out >hundreds of same updates, resulting in their computers eventually >crashing and overloading oth...

Problems moving Microsoft Date and Time Picker Control on MFC dialog
I've got an MFC CDialog class that displays and manages a dialog. There are several controls on the dialog (combo boxes, edit boxes, static text boxes, etc.). Included in the mix are four Microsoft date and time picker controls. The dialog is used in three separate instances. Not all of the controls are relevant in all three instances so we hide the controls that aren't relevant in each instance, move the controls around on the screen, and resize the dialog to eliminate dead areas on the dialog. We are getting the CWnd for each control and using the SetWindowPos method for each control...

Problem with Validation Error
I have a form with a textbox control bound to a table field. The table has no validation properties set for this field; the field is indexed with 'No Duplicates'. The textbox itself has no validation properties set for the field. I have the following code in the textbox's BeforeUpdate event: If Not (txtCARDocNumber Like "C####") Then MsgBox "The CAR Number must be in the format 'Cnnnn'," & vbNewLine _ & "where n is any numeric character." _ , vbExclamation + vbOKOnly, "CAR Number Format Inco...

CDHtmlDialog
I've built the DHtmlExplore Sample from Visual C++ MFC Samples but it doesn't run at all. It fails on DoModal(). Hi Ram, Thanks for you posting in this group! I have built and runned the DHtmlExplore Sample in VS.NET 2003, it works fine. Would you please post some more detail error messages with your situation if possible, with that maybe I can do some help on your problem. Best regards! Gary Chang Microsoft Online Partner Support Get Secure! � www.microsoft.com/security This posting is provided "AS IS" with no warranties,and confers no rights. -------------------...

Owner assignment problem
I have issues with the way CRM cascades entity ownership to child records. Specifically, I want to be able to control what it cascades changes to. We have three sales departments which do not work in teams. An opportunity may be created by a salesperson that is not the owner. But it seems that if any change is made to the account or contact that the opportunity is linked to, then the opportunity and all of its activities get reassigned. Since I cannot turn this "feature" off, I am about to turn on a stored procedure that I have written that processes a log table populated b...

On and Off problem
First, this site is awesome. Cheers and congrats to the developers! Second, I got a excel problem (to me it is monster) I got a spreadsheet with Yes or No responses to an online Survey(1 questions). I need a way to give weight to each individual response so that I get total score for that survey response. The formula would be uniforml applied to all responses. That is it. Any help is greatly appreciated! HumbleA 1 2 3 4 5 6 ........ A y n y ............ B y n y ............ C n n y ............ D y y y ...

Problem loading from a serialized CTypedPtrList
I can't seem to figure this one out... I have a class called CFolder that I'm using in an SDI application. CFolder contains TypedPtrLists to store CProgram objects as well as other CFolder objects. I'm double linking the lists, which is to say that each CFolder stored in a list also contains a member variable, pParentFolder, that points to the CFolder in which it is stored. The problem is this: I can save the file okay, but when I read the stored data from a file, and then close the application, I get a memory leak. Basically, I'm creating "extra" folders on seriali...

Problems with Signature #2
Hi, I'm hoping someone has an idea on how to fix this problem. My brothers have been messing with my pc. I really don't know what they did to my email but now all of a sudden the signature on my email is not coming up. All I see is an X in a square. It never happened before. I went to "options" to look at the signatures and made sure everything was correct. And everything is fine. You can see them in the signature preview with no problems. And I even checked that the format of the emails was still showing HTML like I always had it. So, I really don't know what coul...

Outlook 2003: problems sending mails
Hi to all, I have a "big" problem with outlook 2003. I use Outlook mostly offline; my idea is that the prepared messages lay in the outbox folder until I reconnect and I click on Send/Receive. My idea seems to be a good idea for me but not for outlook: the messages prepared offline lay in the outbox with a "none" sent date and they stay there even if I click on send/receive. There's no way to send them but re-typing... that it's a little unconfortable... Is there someone that has a solution for this thing that to me resembles to a bug? If there isn't a solu...

Web Login Problem
I have just installed a copy of CRM. I have been shutting this down most evenings when I finish working with it. However, people are now using this so I am leaving it up over-night. The first time that I did this I found that the next day no-one could login. When they accessed the site http://sbs the status bar reported opening site and nothing happened for 10-15 mins, then an error was finally returned. I rebooted the server and everything was fine. I now find that this happens every night, so I re-installed CRM and attached the original database but this is still happening. Has...

Macro/security problems
Hi Im trying to help a user here with a problem in excel 2003. He is getting error messages when trying to open excel files telling him the security level is too high etc. I tried http://support.microsoft.com/kb/291206/EN-US on his computer but no dice. He is able to open the documents but data in them are missing...any ideas? Do you have access to xl97, xl2k, or xl2002? Maybe you could try opening the workbook in one of them to see if there really is any data there? You may want to try OpenOffice. If the file is corrupted, OpenOffice may be able to open it. http://www.openoffice.org, a 6...

Transaction problem between DAO and ADO
Hi, Was using DAO all along and following code was working fine: wrkspc.Begintrans with rst ..MoveFirst Do Until .EOF ..AddNew !pkID = DMax("pkID", "Table") +1 ....other table fields ..Update ..MoveNext Loop End with User Confirmation... wrkspc.committrans User Cancellation wrkspc.rollback Have recently switched to ADO - not much experience with it either... Reworded the above code to make it suitable for ADO. Using connection object to begin/commit/rollback the transaction. Problem is that the code raises an error in ADO because the DMax fu...

problem speed to reach to CRM
hello, our thopology : 1 server : Xeon 3.2 2Go Ram Install on:2003 R2, SQL 2005 STD, CRM PRO 3.0 Problems : We used CRM without any problem, then day at the following day the interface of CRM becomes very very slow, we reach the data well but it is unusable at this speed. Question : Already lived this problem? What to make? What to test? Thank you Cordially This is a multi-part message in MIME format. ------=_NextPart_000_0008_01C74868.5DE47380 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Are your users using IE7? If so try...

PW problem with 2003
I see lots of posts here about lost pws or pws that folks didn't even know existed. However, I haven't found a direct answer to my problem. My wife has been using Money 03 for some time. It appears (to me) that she created a .net account and used it to log in. While she primarily uses the offline product, some of the online stuff may have been used as well. Her pw was stored, but she also had it written down. Last weekend we had a small problem on her machine and her quicklaunch buttons were all deleted. When I recreated the button and she launched the program her login an...

Problems with attachments
Version: 2008 Operating System: Mac OS X 10.6 (Snow Leopard) Processor: Intel Email Client: imap Hello All, <br><br>Since a couple of weeks, whenever I send a PDF file (*any* PDF file) through Entourage, this is what happens: <br><br>- if the recipient is using an iPhone, there is a question mark instead of the attachment icon <br> - if the recipient is using Apple Mail, the PDF file is correctly displayed/previewed within the email, but at the bottom of it there is a &quot;player slider&quot;, as if the PDF file were a video clip <br> - if t...

sync offline folders problem
I've recently installed Intellisync for Yahoo and now my offline folders in Outlook no longer sync. Here's the error message: 7:53:05 Synchronizing Mailbox 'Stephen Rentz' 7:53:05 Synchronizing Hierarchy 7:53:06 Terminated in error 7:53:06 [80070057-501-0-733] 7:53:06 The client operation failed. 7:53:06 Microsoft Exchange Server Information Store 7:53:06 For more information on this failure, click the URL below: 7:53:06 http://www.microsoft.com/support/prodredirect/outlook2000_ us.asp?err=80070057-501-0-733 7:53:07 Microsoft Exchange offline address book 7:...

serialisation problem
Although I get on OK with the Serialise routines I have problems if file corruption happens. Basically the program refuses to load the serialised file and the user is very frustrated. Is there anyway of writing the serialised file in a format so it can be picked through manually to try and repair it. Or is there a way of using XML to serialise an MFC project. Any information will be much appreciated. Hope this makes sense. Phil >Although I get on OK with the Serialise routines I have problems if file >corruption happens. Phil, Why is the file getting corrupted? If it's not ...

Query Problems
I have a table of ecards that is populated from a website and includes receiver, sender, and Team leader. The problem I am having is names can be entered into the table like this "Tom Thumb", but Team leader is a dropdown menu that is constant and lists name like this: "Tom S. Thumb". When I make a query to find all the members of Tom S. Thumb's team, I get everyone except Tom Thumb, who is member too. Tom Thumb has his own higher team leader, so I can't change that. How do I get Tom Thumb to be included when I enter "Tom S. Thumb" as Team Leader? ...

Transaction matching problem in Money 2006
I've seen a number of posts on this forum regarding Money's transaction matching feature, but have not found any that address my particular annoyance. I've got some recurring monthly bills setup on my Discover card that have variable amounts. Money automatically downloads the electronic transactions and accurately matches them to the bills I set up manually. The problem is that when I go to Accept the proposed match, it wants to keep the manually entered amount (which is only an estimate) rather than the amount from the electronic transaction which is what actually got charged t...

strings and CDHtmlDialog
Hi, I'm working on application where visual representation is done by using CDHtmlDialog. All .htm files are linked as resources, same for images. We use images like this: ....in.rc2 file we define it as images/res.jpg HTML "images/res.jpg" ....and then use it in .htm file as <img src="images/res.jpg"> It works fine. Is there a way to include text from STRINGTABLE in .htm file? Thanks in advance, Primoz ...

Problem opening file in excel
I just loaded Excel 2000 onto my computer. I have Windows 98. I can open Excel but when I try to open my expense statement from my A: drive I receive this message. <File name> cannot be accessed. The file may be read only or you may be trying to access a read only location. Or, the server the document is stored on may not be responding. I know it is not my disc because I have recently opened it on another pc. I am not sure what the problem is but would greatly appreciate any suggestions. Christy, You should NEVER work with Excel directly off of a floppy. Always copy the file ...

There was a SMTP communication problem with the recipient's email
Hi, We are in the process of migrating From Exchange 5.5 to Exchange 2003. We send many mails from one unix server using our Windows Exchange server as relay. As part of conversion we are trying send all these mails through our new Exchange 2003 server. Untill now we were using our Exchange 5.5 server without any problem as the smart host. As soon as we have started using Exchange 2003 server as smart host for the unix server we see many mails not going to the destination. Most common errors There was a SMTP communication problem with the recipient's email server. ...

CDHtmlDialog: Memory usage... :-/
Hi, I made a test app using CDHtmlDialog and all it does is display the dialog containing a html page. When i check the memory usage it uses 10,240 kb, is this normal? Is there a way to decrease the memory usage in html dialogs? Thx in advance, Thomas Hi, Thomas. CDHtmlDialog is using IE rendering engine which is good for Internet browsing tasks. And not supposed to be lightweight. I would recommend you to visit ours http://terrainformatica.com/htmlayout as an alternative. Andrew Fredoniouk. Terra Informatica Software Design. "Thomas" <Da_QuiK@fake.email.com> wrote in...

Save problems
If I have run powerpoint from the my 'start' button and then use the powerpoint 'open' command, the file opens fine, does not rename and can be saved without issue. However, if I use windows explorer to locate the file and double click it to open up the file and powerpoint (2007), the file is renamed as a 97-2003 file, saves with a new name (one that I don't name) and deletes the original file. Any ideas? In addition - this does not happen to this document on other computers - only when I open this document on my computer. "NPhlud" wrote: &...