UTF-8 con BOM

Post Reply
User avatar
Silvio.Falconi
Posts: 7235
Joined: Thu Oct 18, 2012 7:17 pm
Been thanked: 16 times

UTF-8 con BOM

Post by Silvio.Falconi »

is there a command or function that can convert all special characters such as "à" or "n°" because when I put it in an html file I see strange symbols, it would take a command like UTF-8 with BOM

on my html I allready insert

Code: Select all | Expand

 TEXT INTO cHtml
      <!DOCTYPE html>
      <html lang="it">
      <head>
         <meta charset="UTF-8">
but it's not enough

because I have a string as "contabilità" with a grave or "Ordine n°" and on html I see a symbol ?
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour March-April 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
User avatar
cnavarro
Posts: 6605
Joined: Wed Feb 15, 2012 8:25 pm
Location: España
Has thanked: 6 times
Been thanked: 8 times

Re: UTF-8 con BOM

Post by cnavarro »

You editor is configured for UTF8?
Cristobal Navarro
Hay dos tipos de personas: las que te hacen perder el tiempo y las que te hacen perder la noción del tiempo
El secreto de la felicidad no está en hacer lo que te gusta, sino en que te guste lo que haces
User avatar
Silvio.Falconi
Posts: 7235
Joined: Thu Oct 18, 2012 7:17 pm
Been thanked: 16 times

Re: UTF-8 con BOM

Post by Silvio.Falconi »

I use xmate
But the problem Is on a menu "contabilità" i change With che(224) and on the HTML i make a converion. Strtran With agrave;
Now seems tò run ok
For the oders "orders n°' i saw i can change because It Is my script and the Number of invoice come from dbf , i must only make some test
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour March-April 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
User avatar
Giovany Vecchi
Posts: 225
Joined: Mon Jun 05, 2006 9:39 pm
Location: Brasil

Re: UTF-8 con BOM

Post by Giovany Vecchi »

Try this

Code: Select all | Expand

 TEXT INTO cHtml
_CodeUtf8Bom_
      <!DOCTYPE html>
      <html lang="it">
      <head>
         <meta charset="UTF-8">
ENDTEXT

cHtml := Strtran(cHtml,_CodeUtf8Bom_,chr(239)+chr(187)+chr(191))
Post Reply