Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Saving unicode data
Message
De
28/12/2011 09:07:51
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Contrôles ActiveX en VFP
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows 7
Network:
Windows 2003 Server
Database:
MS SQL Server
Divers
Thread ID:
01531693
Message ID:
01531781
Vues:
50
This message has been marked as a message which has helped to the initial question of the thread.
J'aime (1)
>>So, it's very simple
>>
>>
>>(1) the msforms accepts UTF-16
>
>If I get the value from SQL Server, I don't get the string above. I get a 4 bytes per character string. You missed the step of retrieving the value from SQL Server.

Look, I just copied your code to fill the cursor - and it's 2 bytes/char


>>(2) And gives its value back in the 'current' code page - which is a bad conversion
>>(3) swith to the code page of the language you're displaying with sys(3101)
>
>!!!!!!!!!!!!! But I don't know which language I am displaying - that's the whole point!

Well, you'll need to know the language - how else can you know the codepage ?


>
>>(4) retrieve the value
>>(5) set the original value of sys(3101) back
>>(6) convert the value to utf-16
>
>Ok, I'll try.
>
>Although two extra steps are missing in your tests:
>
>1. Retrieve data from nvarchar(100) field

That is the cursor

>
>5. Save data back to nvarchar(100) field

Well, I have the data in a string - you can add an undate or a replace ?


>6. Try with different languages (don't know in advance which) and all different languages need to show correctly on the same form.


I have shown an example in Cyrillic - surely you can try a few others
Gregory
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform