![]() |
|
| View Poll Results: How was that ? | |||
| Good |
|
1 | 25.00% |
| Nice |
|
0 | 0% |
| Ummm, not bad |
|
2 | 50.00% |
boro binim baba delet khoshe
|
|
1 | 25.00% |
| Voters: 4. You may not vote on this poll | |||
|
|
Thread Tools | Display Modes |
|
|
|
|
#1 |
|
Newbie
|
Convert a string to unicode string
Hi dudes,
I want to convert a string variable to its Unicode equivalent. I know that I should use the MultiByteToWideChar function to do that. But I get the same result. Here is an example of that: function ToUnicodeString(s:string):string; var p1 Char;pw1:array[0..1024]of WideChar; nLen1,nLen2:integer; begin p1:=PChar(s); nLen1:=Length(s); nLen2:=nLen1 * 2; MultiByteToWideChar(CP_ACP , MB_COMPOSITE , p1 , nLen2 , @pw1 , nLen2); Result:=WideString(pw1); end; Is there anything wrong in the code above ? Thanks for help from anyone. |
|
|
|
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|