Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Saving unicode data
Message
From
28/12/2011 09:07:51
 
General information
Forum:
Visual FoxPro
Category:
ActiveX controls in VFP
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows 7
Network:
Windows 2003 Server
Database:
MS SQL Server
Miscellaneous
Thread ID:
01531693
Message ID:
01531781
Views:
52
This message has been marked as a message which has helped to the initial question of the thread.
Likes (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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform