简体   繁体   English

Android:如何在sqlite3数据库的文本中间插入下标

[英]Android: How to insert subscript in the middle of the text in sqlite3 database

I am populating into sqlite3 db from a text file and i have many superscript in the middle of the text. 我从一个文本文件填充到sqlite3 db中,并且在文本中间有很多上标。 Can anyone please let me know as what should i add in my text file, to make this work 任何人都可以让我知道,我应该在我的文本文件中添加什么以使这项工作生效

In the database, all TEXT fields contain plain text. 在数据库中,所有TEXT字段均包含纯文本。

If you want to have formatting instructions, you have to encode them somehow, eg, as HTML: 如果要使用格式说明,则必须以某种方式对其进行编码,例如,作为HTML:

some text <sub>with subscripts</sub> ...

or TeX: 或TeX:

some text \textsubscript{with subscripts} ...

This implies that you always have to ensure to escape special characters (like < or \\ ). 这意味着您始终必须确保转义特殊字符(例如<\\ )。

What format to use depends on what software you use to actually format the text later (Android widgets typically support HTML). 使用哪种格式取决于您稍后使用哪种软件实际格式化文本(Android小部件通常支持HTML)。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM