Accented characters again

Thierry Nauze ohmitou at wanadoo.fr
Sun Nov 28 15:54:07 CST 2004


Hello

If I understood your problem, the solution which follows works fine :


1 TWO FUNCTIONS

Function macRoman(s as string) as string
     return convertEncoding(s,encodings.MacRoman)
End function

Function deCode(s as string) as string
     convertEncoding(defineEncoding(s,encodings.MacRoman),encodings.UTF8)
End function



2  RECORDING

p="Zoé"
n="Noël"

  zeBase.mClients.setBlank
  zeBase.mClients.id.value=23
  zeBase.mClients.prenom.value=macRoman(p) 
  zeBase.mClients.nom.value=macRoman(n)
  zeBase.mClients.AddRecord



3 QUERY

p="Zoé"

curseur=zeBase.SQLselect( macRoman("SELECT nom FROM clients WHERE
prenom='"+p+"'") )

n= deCode( curseur.field(1).getString )           ~> n="Noël"


The "query string" is COMPLETELY  in macRoman .


Regards,

-- 
Thierry Nauze               Saint-Denis de la Réunion



More information about the Valentina mailing list