What is the key output difference between Active data position and Active presentation position defined separately in ECMA-48 in 4.2.5 and 4.2.6 ?
I tried to move my cursor to a different coordinate in the console with Escape Sequences defined in ECMA-48.
And I encountered two implementations doing the same thing but actually telling something different in the definitions.
According to the definitions:
CUP
CUP causes the active presentation position to be moved in the presentation component ...
HVP
HVP causes the active data position to be moved in the data component ...
When tested with C code:
CUP:
printf("Hello");
printf("\x1b" "[" "%d" ";" "%d" "H", 5, 5);
printf("World");
HVP:
printf("Hello");
printf("\x1b" "[" "%d" ";" "%d" "f", 5, 5);
printf("World");
They produce the same results.
So, whats the difference that the standard is trying to make by defining these two terms?
EDIT :
According to 6.1.5,
In a uni-directional device, whether it has a presentation component only or a presentation component and a data component, there is no difference between the active data position and the active presentation position.
And in page 16 (6.1.5), in the first paragrpah:
Because of the possible differences between character progression and character path, as in some bi-directional environments, the coordinates of the active data position in the data component and of the active presentation position in the presentation component may differ.
Explain Active Presentation Position and Active Data Position in a Bi-directional Environments with Practical Example.
And, which one should I use to move around the console?
[N.B: Don't mention to use ncurses in your recommendation. But any recommendation on Implementation of ECMA-48 is welcomed]