Good day!
Neponyatka turned out, somehow before and did not think. If the DataGridView contains data not related to the DataSet (it did not check with it), and the data contains Russian characters, then select the cells and copy them to the clipboard using the regular keys ctrl + c (ctrl + ins), then when pasting data into various editors for the place of the Cyrillic I see rubbish. To be more precise, something like this:
- Copy - see in the clipboard several data types (HTML, TXT and something else)
- We paste it into notepad / notepad ++ / wordpad (txt data is inserted from the buffer) - we see co-sharps, however, if you copy with the Russian layout, the data is correct.
- We insert it into MS WORD (the html data type is inserted by default) - we see that it’s not at all clear that, no, the label was drawn, of course, but the data for some reason became different fonts, with cubes and hieroglyphs. And when I look at the clipboard, I see the correct data in both txt and html format, except that there is no data encoding tag in html, all letters are encoded in win1251, as I understand it.
Data in DataGridView cells is only text, all cells have Tahoma font, I tried to use Times New Roman, standard MS Sans Serif, and no reaction ... I feel that there is a catch somewhere in the transcoding of native utf8 in not very win1251. I don't really want to copy copying to the clipboard from this control. I believe that it is possible to solve it somehow more simply =) Now we have to overtake the buffer through a notebook in order to insert it into the Word later.
PS: why does copying Russian text to the clipboard depend on the current keyboard layout? I have not once come across such programs, which for the place of the Russian text gave out squares, questions and other crap, if copying was not done with the Russian keyboard layout?
Another thanks for the feedback.
DataGridView
with one element without any binding, the problem is reproduced? - VladDDataGridView
contains a bug. They propose a temporary solution - disable the built-in copy and copy to the clipboard through the code-behind. - VladD