什么是最好的不可见字符,我可以用它来代替&安培; NBSP;? [英] What is the best invisible character can I use to replace  ?

查看:232
本文介绍了什么是最好的不可见字符,我可以用它来代替&安培; NBSP;?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我用一些Telerik的报告打印一些报告。

I use some telerik report to print some report.

我需要使用Telerik.Reporting.TextBox打印标签。

I need to use Telerik.Reporting.TextBox to print labels.

有些标签是股票.txt文件,像苹果。

Some labels are stock in .txt files, like " Apple".

当我看到有空格的标签,这意味着我必须缩进在报告中,所以在文本框。

When I see a label with spaces, it means I have to indent it in the report, so in the TextBox.

问题是,当我们导出PDF格式的报告,我们有压痕,而不是当我们在浏览器中看到。如果我被替换的空间; NBSP;&AMP,我们看到了压痕的浏览器,但导出为PDF时,我们看到了与& NBSP;

The thing is when we export the report in pdf, we have the indentation, but not when we see in the browser. If I replace the spaces by "& nbsp;", we see the indentation in the browser, but when exporting to pdf, we see the "& nbsp;".

要做到这一点的方法之一是使用HtmlTextBox,所以浏览器和出口工作正常,但我们还有其他的限制,说我们必须保持文本框。

One way to do this is to use HtmlTextBox, so both the browser and the export works fine, but we have other constraints that says we must keep the TextBox.

我的想法是一个空白字符,一个invisble之一,像ALT + 0160来代替空格,但有很多的选择,我想了一个会在任何浏览器中运行,任何出口(TIFF,PDF ,Excel的...)。

My idea is to replace the spaces by a blank character, an invisble one, like alt+0160, but there is a lot of choice, and I want the one that will work in any browser, any export (TIFF, PDF, Excel...).

时有人对此选择好线索?

Is someone have a good clue about this choice ?

推荐答案

您可以使用统一code code点U + 00A0(非换空间),这是该实体&安培; NBSP; 重新presents。这个应该怎么带你的文档中的codeD取决于所使用的字符集。

You could use Unicode code point U+00A0 (non-breaking space), which is what the entity   represents. How this should be encoded in your document depends on the character set in use.

这篇关于什么是最好的不可见字符,我可以用它来代替&安培; NBSP;?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆