Active data position 和 Active presentation position 之间的区别

Difference between Active data position & Active presentation position

在 4.2.5 和 4.2.6 的 ECMA-48 中单独定义的 Active data position 和 Active presentation position 之间的关键输出区别是什么?

我尝试使用 ECMA-48 中定义的转义序列将光标移动到控制台中的不同坐标。

我遇到了两个实现做同样的事情但实际上在定义中讲述了不同的东西。

根据定义:

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 ...

使用 C 代码测试时:

银联:

printf("Hello");
printf("\x1b" "[" "%d" ";" "%d" "H", 5, 5);
printf("World");

HVP:

printf("Hello");
printf("\x1b" "[" "%d" ";" "%d" "f", 5, 5);
printf("World");

它们产生相同的结果。

那么,标准试图通过定义这两个术语来实现的区别是什么?

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.

而且,我应该使用哪一个来移动控制台?

[N.B: Don't mention to use ncurses in your recommendation. But any recommendation on Implementation of ECMA-48 is welcomed]

如其所说:对于单向设备没有区别。您必须研究 双向 设备(并启用相应的模式)。

指的是在终端以从左到右[以外的其他方式打印字符后,光标可以前进的设备=27=],包装 从上到下 。您可以在 GUI Web 浏览器访问阿拉伯语页面时看到类似的内容:文本从右到左,但您可以在其中嵌入从左到右书写的文本组件。数据和表示位置用于保持该混合直线。 (如果没有混合,这是一个微不足道的问题,但因此没有什么意义)。

VT100s 从来没有这样做过。 early/mid-1990s 中 DEC 的最后一个终端,VT520 没有(很可能没有广泛使用支持双向控制的终端)。虽然 HVPECMA-48 2nd edition (August 1979), the wording about direction was added in the 4th edition (December 1986). It was revised somewhat for the 5th edition(1991 年 6 月)。

一些终端仿真器可以做到这一点,但缺少硬件终端(这将展示编写文档的委员会成员所想的功能),在解释上存在分歧和分歧。