Hi Folks,

Newbie here.

I have a few questions about encoding discovery, copying text, and pasting text 
in one encoding into text in another encoding. 

1. I open a text editor and then input a text document. How does the text 
editor discover what the document's encoding is? Is its encoding stored in the 
text document? If yes, where and how is it stored? Or is it stored in metadata 
by the operating system?

2. I have a text editor open and it contains text that is encoded using 
encoding A. I select some of the text and copy it to the clipboard. What is 
copied: (a) the characters (glyphs) that I visually see displayed on the 
screen, or (b) the hex values of each character displayed on the screen, or (c) 
the codepoints, or (d) something else (what else)?

3. Continuing question 2, when text is copied, is its encoding also copied? Is 
the encoding stored in the clipboard?

4. I have two text editors open. Text editor #1 contains text that is encoded 
using encoding A while text editor #2 contains text that is encoded using 
encoding B. Encoding A is different from encoding B. I copy text from #1 and 
paste it into #2. Does text editor #2 realize, "Oh my, the text being inserted 
uses a different encoding so I better convert each of its hex value into the 
equivalent hex value in my encoding." Is that the way it works?

Any insights you provide will be greatly appreciated.

/Roger


Reply via email to