CGDevTools Forum

Welcome to the Official CGDevTools Support Community Forums.

french accents

by assapan » 05 May 2014 15:19

Hi,
I have a problem with the french accents with labelex .
If i write directly in the Textex property the html string the characters are displayed correctly but if i do use the loadSourceOptions property to load the same informations contained in an html file the accent are not well displayed !
can you help .
on left side of the attached image is the labelex with html file and on the right side using the textex property.
You do not have the required permissions to view the files attached to this post.
Want to visit Ardeche http://leclosdelarc.fr/index.php
The Pont d’Arc Cavern http://en.cavernedupontdarc.fr
Image
User avatar
assapan
 
Posts: 600
Joined: 16 Dec 2013 12:04
Location: France

by Jorge Sousa » 05 May 2014 15:45

Hello

What is the charset of that html ?

as it is, it must be utf-8

We can however add the property AjaxOptions, to be able to setup the ajax configuration:

namely AjaxOptions.ContentType

contentType (default: 'application/x-www-form-urlencoded; charset=UTF-8')
from
https://api.jquery.com/jQuery.ajax/
Best Regards
CGDevTools Develop / Support Team
Home Page: http://www.cgdevtools.com
Jorge Sousa
 
Posts: 4261
Joined: 17 May 2012 09:58

by assapan » 05 May 2014 18:35

Hi ,
I haven't been able to make it work , despite i wrote a procedure , the server get the html file with idhttp and put the result in the labelex and it works :?
Want to visit Ardeche http://leclosdelarc.fr/index.php
The Pont d’Arc Cavern http://en.cavernedupontdarc.fr
Image
User avatar
assapan
 
Posts: 600
Joined: 16 Dec 2013 12:04
Location: France

by Jorge Sousa » 05 May 2014 18:52

Hello

That takes twice the time.

can you send us the html by email or post here?

tia
Best Regards
CGDevTools Develop / Support Team
Home Page: http://www.cgdevtools.com
Jorge Sousa
 
Posts: 4261
Joined: 17 May 2012 09:58

by assapan » 06 May 2014 08:45

Hi,
attached zipped html

thank you for all
You do not have the required permissions to view the files attached to this post.
Want to visit Ardeche http://leclosdelarc.fr/index.php
The Pont d’Arc Cavern http://en.cavernedupontdarc.fr
Image
User avatar
assapan
 
Posts: 600
Joined: 16 Dec 2013 12:04
Location: France

by Alexander Bulei » 06 May 2014 11:22

Hi assapan,

The problem is in encoding of file.

You need change/convert the Gafor.html to UTF-8.

Use the notepad++ to convert it.

Attached the converted file.

Best Regards.
You do not have the required permissions to view the files attached to this post.
Group: Developers | Support Team

  • info [at] cgdevtools.com - General information
  • sales [at] cgdevtools.com - Sales department
  • support [at] cgdevtools.com - Product and Technical Support
User avatar
Alexander Bulei
Site Admin
 
Posts: 3635
Joined: 15 May 2012 08:52
Location: Mealhada, Portugal

by assapan » 06 May 2014 11:44

Hi , it is ok if we are the source of this page but for example if i want to show a page coming from a blog or anything like this i can't unless it is encoded in UTF-8 :?
Want to visit Ardeche http://leclosdelarc.fr/index.php
The Pont d’Arc Cavern http://en.cavernedupontdarc.fr
Image
User avatar
assapan
 
Posts: 600
Joined: 16 Dec 2013 12:04
Location: France

by Alexander Bulei » 06 May 2014 12:37

Hi assapan,

Well,
1st- to display that chars, the html page should be in UTF-8 or iso-8859-1 (or another specific charset)
2nd - to get the external page you should configure AjaxOptions:

* Fixed minor issue at next build with ContentTypeString property

delphi code
ContentTypeString:= 'Content-type: text/plain; charset=iso-8859-1'; // or UTF-8
OnBeforeSend.Script:= 'function (jqXHR, settings){ jqXHR.overrideMimeType(''text/html;charset=iso-8859-1'''); }' // or UTF-8;


With your file (ANSI) works as expected.

Best Regards.
Group: Developers | Support Team

  • info [at] cgdevtools.com - General information
  • sales [at] cgdevtools.com - Sales department
  • support [at] cgdevtools.com - Product and Technical Support
User avatar
Alexander Bulei
Site Admin
 
Posts: 3635
Joined: 15 May 2012 08:52
Location: Mealhada, Portugal

by assapan » 06 May 2014 14:43

Thanks a lot , i tried and it works well .
Want to visit Ardeche http://leclosdelarc.fr/index.php
The Pont d’Arc Cavern http://en.cavernedupontdarc.fr
Image
User avatar
assapan
 
Posts: 600
Joined: 16 Dec 2013 12:04
Location: France


Return to JQLabelEx

Who is online

Users browsing this forum: No registered users and 1 guest

Contact Us.