Après windows pour les nuls, voici PB pour les bons (ou presque).

Le forum (ô combien francophone) des utilisateurs de Powerbuilder.

Recherche rapide

Annonce

Certaines rubriques, dont des cours, sont uniquement visibles par les membres du forum ^^.
Dans la rubrique Liens & Références, vous avez accès à un sommaire de téléchargement, profitez-en !
Il existe maintenant un nouveau TOPIC "Votre CV en Ligne" accessible uniquement par demande.

#1 17-11-2008 10:34:50

thefab  
Membre Geek
Lieu: Sion
Date d'inscription: 25-09-2008
Messages: 43
Pépites: 4
Banque: 0

[RESOLU] Convertion ASCII / Unicode

Bonjour,

Comment convertir un texte en ASCII vers Unicode et inversement ?

Question subsidiaire: j'ai migré une application mais lors de la migration je n'ai pas dis de convertir automatiquement les fonctions texte en Unicode, est-ce possible de le faire par après ?

D'avance merci et bon début de semaine.

Fab

Dernière modification par thefab (17-11-2008 12:41:02)

Hors ligne

 

#2 17-11-2008 10:41:01

erasorz  
Admin
Lieu: Babylone
Date d'inscription: 23-11-2006
Messages: 5121
Pépites: 97,197
Banque: 2,147,483,647

Re: [RESOLU] Convertion ASCII / Unicode

This example converts the blob instance variable ib_sblob, which contains string data in ANSI format, to a string and stores the result in sstr:

Code: pb

string sstr

sstr = String(ib_sblob, EncodingANSI!)


The ToUnicode function converts an ANSI character string to a Unicode blob. ToUnicode has the same result as Blob(string) and will be obsolete in a future version of PowerBuilder.

Calling external functions

http://pbadonf.fr/forum/viewtopic.php?pid=19533#p19533

When you migrate an application from a previous release, the source code is converted to Unicode and the following changes to your source code are made automatically:

The clause ALIAS FOR functionname ;ansi is appended to external function declarations that return a string, char, or structure datatype or have a string, char, or structure value as an argument. This indicates that the arguments and/or return values should be treated as ANSI. If an ALIAS FOR clause is already present, only ;ansi is added. If ;ansi is not appended to the function name, strings are treated as Unicode.

The FromAnsi, FromUnicode, ToAnsi, and ToUnicode functions will be removed from a future version of PowerBuilder. The migration tool replaces them with the appropriate syntax of the Blob or String function.


N'envoyez jamais un humain faire le travail d'un programme.

Hors ligne

 

#3 17-11-2008 12:40:18

thefab  
Membre Geek
Lieu: Sion
Date d'inscription: 25-09-2008
Messages: 43
Pépites: 4
Banque: 0

Re: [RESOLU] Convertion ASCII / Unicode

Et bien merci beaucoup !!

Fab

Hors ligne

 

Pied de page des forums

Propulsé par FluxBB 1.2.22