[windev] Problem reading text files

Chris Becke Chris.Becke at derivco.com
Thu Apr 2 13:50:31 GMT 2009


Oh,
How are you getting the text into the CHTMLView control?

ActiveX controls mostly have unicode interfaces, so any non unicode API to inject the text is probably going to parse the text as ANSI (i.e. whatever your systems default codepage for non unicode applications is) for the purpose of converting to unicode that will then be sent to the control.


________________________________
From: truckleaj-windev at yahoo.co.uk [mailto:truckleaj-windev at yahoo.co.uk]
Sent: Thursday, April 02, 2009 3:40 PM
To: David Little; Chris Becke; Windows Developers (Mailing List)
Subject: Re: [windev] Problem reading text files

Hi

It isn't a font matter. Arial covers the basic accents. Also, if I set it to the Arial Unicode MS I get a different symbol showing.

It only seems to work if I use the windows-nnnn charset values.

Andrew

________________________________
From: David Little <dlittle at coade.com>
To: Chris Becke <Chris.Becke at derivco.com>; Windows Developers (Mailing List) <windev at windev.org>
Sent: Thursday, 2 April, 2009 13:50:38
Subject: Re: [windev] Problem reading text files

I think you have to choose a font with all the correct characters.  Try
Arial Unicode MS as a test.  Every font won't have those characters, and
missing characters are rendered as boxes.  I don't think it's a UTF8
issue.

For a test, try to render http://www.columbia.edu/kermit/utf8.html into
your CHTMLView box.  It has the same phrase in 100 different languages.

-----Original Message-----
From: windev-bounces at windev.org<mailto:windev-bounces at windev.org> [mailto:windev-bounces at windev.org<mailto:windev-bounces at windev.org>] On
Behalf Of Chris Becke
Sent: Thursday, April 02, 2009 4:20 AM
To: Windows Developers (Mailing List)
Subject: Re: [windev] Problem reading text files



-----Original Message-----
From: Chris Becke
Sent: Thursday, April 02, 2009 11:20 AM
To: 'truckleaj-windev at yahoo.co.uk<mailto:truckleaj-windev at yahoo.co.uk>'
Subject: RE: [windev] Problem reading text files

Have you set the meta-tag specifying the HTML encoding to be UTF-8 ?

<meta http-equiv="Content-Type" content="text/html;charset=utf-8" >

The HTTP specification specifically says that HTML documents with no
meta tag need to be parsed as the traditional western EU (windowsnnnn)
codepage.

CHTMLView should be doing little more than instantiating a
Shell.Explorer ActiveX control - so im not sure why it would render fine
in IE7 but not the HTMLView...

-----Original Message-----
From: windev-bounces at windev.org<mailto:windev-bounces at windev.org> [mailto:windev-bounces at windev.org<mailto:windev-bounces at windev.org>] On
Behalf Of truckleaj-windev at yahoo.co.uk<mailto:truckleaj-windev at yahoo.co.uk>
Sent: Thursday, April 02, 2009 10:11 AM
To: Serge Wautier; WinDev
Subject: Re: [windev] Problem reading text files

The other problem I have is that CHtmlView doesn't seem to like the
UFT-8 encoding very much.

If I set the file as that, including the declaration line at the top,
and right-click the view the encoding is set to UTF-8 but the italian
accents show as boxes.

The only way I have got the variuous languages to work is by using a
charset of windowsnnnn accordingly. Then the HTMLView renders the
accents.

But if was my understanding that UTF-8 was what we should be using these
days. The same file renders fine in IE7, not not in the web-browser
control. I tried to google for CHtmlView / encoding / utf-8 and couldn't
see anything about this.

So I have stayed with the relevant windowsnnnn values based upon the
language of my program UI.

Andrew
########################################################################
#####################
The information transmitted is intended only for the person or entity to
which it
is addressed and may contain confidential and/or privileged material.
Any review, retransmission, dissemination or other use of, or taking of
any action
in reliance upon, this information by persons or entities other than the
intended
recipient is prohibited. If you received this in error, please contact
the sender and
delete the material from any computer.

Furthermore, the information contained in this message, and any
attachments thereto, is
for information purposes only and may contain the personal views and
opinions of the
author, which are not necessarily the views and opinions of the company.
########################################################################
#####################
--
Windev mailing list at Windev at windev.org<mailto:Windev at windev.org>

Lost your password?  Need to unsubscribe or change your delivery
options?
Go to http://lists.windev.org/mailman/listinfo/windev
--
Search the Windev Archives - www.windev.org
--
Windev mailing list at Windev at windev.org<mailto:Windev at windev.org>

Lost your password?  Need to unsubscribe or change your delivery options?
Go to http://lists.windev.org/mailman/listinfo/windev
--
Search the Windev Archives - www.windev.org

#############################################################################################
The information transmitted is intended only for the person or entity to which it 
is addressed and may contain confidential and/or privileged material. 
Any review, retransmission, dissemination or other use of, or taking of any action
in reliance upon, this information by persons or entities other than the intended 
recipient is prohibited. If you received this in error, please contact the sender and
delete the material from any computer.

Furthermore, the information contained in this message, and any attachments thereto, is
for information purposes only and may contain the personal views and opinions of the 
author, which are not necessarily the views and opinions of the company.
#############################################################################################
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.windev.org/pipermail/windev/attachments/20090402/c2ec1bdc/attachment.htm


More information about the Windev mailing list