Le forum (ô combien francophone) des utilisateurs de Powerbuilder.
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
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.
Hors ligne
Et bien merci beaucoup !!
Fab
Hors ligne