Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ Library support » ArrayCtrl, HeaderCtrl & GridCtrl » Unicode character paste in GridCtrl
Unicode character paste in GridCtrl [message #17697] Tue, 26 August 2008 12:31 Go to next message
koldo is currently offline  koldo
Messages: 3358
Registered: August 2008
Senior Veteran
Hello all

I do not know to paste properly a unicode character in a GridCtrl.

If I copy from the Notepad to a cell "ñaka" I get in the cell "ñaka".
But if I copy from the Notepad a row (with cells separated with tabs) with "ñaka" inside, I get a row with a cell with "aka".

This only happens copying from outside GridCtrl. If I copy the cell from inside it is pasted perfectly.

In the beginning of the program I have:

SetLanguage(LNGC_('E','N','U','S', CHARSET_UTF8));

Best regards


Best regards
Iñaki

[Updated on: Tue, 26 August 2008 16:13]

Report message to a moderator

Re: Unicode character paste in GridCtrl [message #17716 is a reply to message #17697] Wed, 27 August 2008 13:20 Go to previous messageGo to next message
koldo is currently offline  koldo
Messages: 3358
Registered: August 2008
Senior Veteran
Hello all

Perhaps the reason of that is due to the function void GridCtrl::Paste(int mode) (GridCtrl.cpp) does not handle the clipboard with unicode functions. For example:

Line 766

Instead of:
lines = Upp::Split(ReadClipboardText(), '\n');

Would have to be:
wlines = Upp::WSplit(ReadClipboardUnicodeText(), '\n'); (WSplit does not exists yet, ReadClipboardUnicodeText does exist)

What do you think?



Best regards
Iñaki
Re: Unicode character paste in GridCtrl [message #17718 is a reply to message #17716] Wed, 27 August 2008 14:16 Go to previous messageGo to next message
unodgs is currently offline  unodgs
Messages: 1366
Registered: November 2005
Location: Poland
Ultimate Contributor

koldo wrote on Wed, 27 August 2008 07:20

Hello all

Perhaps the reason of that is due to the function void GridCtrl::Paste(int mode) (GridCtrl.cpp) does not handle the clipboard with unicode functions. For example:

Line 766

Instead of:
lines = Upp::Split(ReadClipboardText(), '\n');

Would have to be:
wlines = Upp::WSplit(ReadClipboardUnicodeText(), '\n'); (WSplit does not exists yet, ReadClipboardUnicodeText does exist)

What do you think?



Change this line to:
lines = Upp::Split(FromUnicode(ReadClipboardUnicodeText()), '\n');
Re: Unicode character paste in GridCtrl [message #17767 is a reply to message #17718] Thu, 28 August 2008 11:00 Go to previous message
koldo is currently offline  koldo
Messages: 3358
Registered: August 2008
Senior Veteran
Well: Simply perfect. Thank you!

Best regards
Iñaki
Previous Topic: GridCtrl empty cells pasted from Excel
Next Topic: Date pasted in GridCtrl saved in sqlite. Problem and solution
Goto Forum:
  


Current Time: Mon Apr 29 00:31:21 CEST 2024

Total time taken to generate the page: 0.29286 seconds