首页 \ 问答 \ 将unicode转换为unicode转义语法(Convert unicode to unicode escape syntax)

将unicode转换为unicode转义语法(Convert unicode to unicode escape syntax)

unicode对象u"ÿ"在Python中给出。 如何将其转换为相应的unicode转义语法"\\u00FF" ? 无法让unicode-escape在这里工作。

编辑:在我的情况下,给出一个字符串对象,内容为r"\u00FF" 。 另一方面,我有一个unicode对象(从上面),我需要进行字符串比较以检查它们是否相等。 我需要unicode转义语法作为来自上面的unicode字符的字符串对象来做到这一点。


The unicode object u"ÿ" is given in Python. How can I convert it to the corresponding unicode escape syntax "\\u00FF"? Couldn't get unicode-escape to work here.

Edit: In my case a string object is given with the content r"\u00FF". On the other side I have a unicode object (from above) and I need to make a string comparison to check if they are equal. I need the unicode escape syntax as a string object from the unicode character from above to do that.


原文:https://stackoverflow.com/questions/32115181
更新时间:2022-10-28 14:10

最满意答案

你可以尝试MuPDF 。 它非常快! :-)

对于高亮显示,您可以检查类MuPDFView.java ; 看看方法:

public boolean markupSelection(Annotation.Type type);

还有一个演示Activity MuPDFActivity ,您可以在其中学习如何实现所有支持的注释类型等。


You could try MuPDF. It's very fast! :-)

For the higlighting you can check the class MuPDFView.java; look at the method:

public boolean markupSelection(Annotation.Type type);

There is also a demo Activity MuPDFActivity where you can learn how to implement all supported types of annotations etc.

相关问答

更多
  • 你可以尝试MuPDF 。 它非常快! :-) 对于高亮显示,您可以检查类MuPDFView.java ; 看看方法: public boolean markupSelection(Annotation.Type type); 还有一个演示Activity MuPDFActivity ,您可以在其中学习如何实现所有支持的注释类型等。 You could try MuPDF. It's very fast! :-) For the higlighting you can check the class MuP ...
  • 博客是旧的解决方案。 使用Android Studio 0.9.2和Gradle插件0.14.1,您只需要: 添加到AndroidManifest.xml: 。 android:name="android.support.multidex.MultiDexApplication" 要么 加 MultiDex.install(this); 在您的自定义应用程序的attachBaseContext方法中 或者您的自定义应用程序扩展MultiDexApplication 在multiDexEnabled = ...
  • 似乎没有一个纯java pdf库可以与android一起使用,因为它们使用Android不支持的库。 我觉得我读了iText有兴趣做一个端口到android,但认为谷歌应该支持他们,如果他们没有,但没有源。 这是一个在android中编写pdf的工作: sourceforge.net/projects/apwlibrary没有尝试过,它表示它只做简单的pdf It seems that no one of the pure java pdf libraries will work with android ...
  • 想到的两个是: pyPdf2 PDFMiner The two that come to mind are: pyPdf2 PDFMiner
  • Mupdf http://www.mupdf.com/ MuPDF是免费软件:您可以根据自由软件基金会发布的Affero GNU通用公共许可协议(版本3的许可协议)或(可选)任何更新版本对其进行重新分发和/或修改。 这是我在SO上找到的链接。 几个pdf库的名单很有帮助 https://stackoverflow.com/questions/4665957/pdf-parsing-library-for-android/4766335#4766335 Mupdf http://www.mupdf.com/ ...
  • Chrome对PDF有自己的原生支持(它不需要安装单独的插件或Adobe Reader)。 Chrome如何支持PDF 维基百科指出,截至2010年6月,内置PDF阅读器的Chrome本身就是一个插件,通过Pepper插件API(PPAPI)作为本机代码运行。 http://en.wikipedia.org/wiki/Google_Native_Client#Pepper 您可以通过为所有插件设置点击播放选项并在线访问PDF文档来确认。 请注意,PDF现在仅在单击拼图块以允许插件运行后才会显示。 点击播放选 ...
  • 下载最新的Android NDK 安装CYGWIN 下载MUPDF的完整源代码(含三十部分工具) 下载Windows的ANT版本 设置所有需要的路径(JAVA_HOME,ANT_HOME) 转到MuPDF目录 运行MAKE命令 然后从c:\ mupdf \ android导入android中的项目 运行你的android项目。 不要忘记在Downloads文件夹中至少保留一个pdf 也遵循mupdf中给出的所有步骤 Download latest android NDK Install CYGWIN Dow ...
  • PdfRenderer类只是将PDF页面转换为图像。 如果你想显示一些页面缩略图,那就好了,但是如果需要一个支持文档导航和缩放的PDF阅读器,那么在PdfRenderer之上实现它就成了一项非常复杂的任务。 The PdfRenderer class simply converts a PDF page to image. If you want to display some page thumbnails it is just fine, but if need a PDF viewer with su ...
  • 试试这个例子。在这里你可以使用jar文件从SDCARD读取,搜索,放大/缩小Pdf文件样本代码 Try this example.Here you can able to Read,Search,Zoom in/out a Pdf-Files from SDCARD by using jar fileSample-code
  • 这里有一个用于java的开源pdf库的大列表。 我没有使用它们中的任何一个,但我敢打赌pdfBox是Apache Foundation的一部分。 它有一个特定的类来突出显示 xml中的PDF,但我认为你还必须重新编译它们。 Here you have a big list of Open Source pdf libraries for java. I haven't used any of them but I'll bet for pdfBox that's part of Apache Foundat ...

相关文章

更多

最新问答

更多
  • 获取MVC 4使用的DisplayMode后缀(Get the DisplayMode Suffix being used by MVC 4)
  • 如何通过引用返回对象?(How is returning an object by reference possible?)
  • 矩阵如何存储在内存中?(How are matrices stored in memory?)
  • 每个请求的Java新会话?(Java New Session For Each Request?)
  • css:浮动div中重叠的标题h1(css: overlapping headlines h1 in floated divs)
  • 无论图像如何,Caffe预测同一类(Caffe predicts same class regardless of image)
  • xcode语法颜色编码解释?(xcode syntax color coding explained?)
  • 在Access 2010 Runtime中使用Office 2000校对工具(Use Office 2000 proofing tools in Access 2010 Runtime)
  • 从单独的Web主机将图像传输到服务器上(Getting images onto server from separate web host)
  • 从旧版本复制文件并保留它们(旧/新版本)(Copy a file from old revision and keep both of them (old / new revision))
  • 西安哪有PLC可控制编程的培训
  • 在Entity Framework中选择基类(Select base class in Entity Framework)
  • 在Android中出现错误“数据集和渲染器应该不为null,并且应该具有相同数量的系列”(Error “Dataset and renderer should be not null and should have the same number of series” in Android)
  • 电脑二级VF有什么用
  • Datamapper Ruby如何添加Hook方法(Datamapper Ruby How to add Hook Method)
  • 金华英语角.
  • 手机软件如何制作
  • 用于Android webview中图像保存的上下文菜单(Context Menu for Image Saving in an Android webview)
  • 注意:未定义的偏移量:PHP(Notice: Undefined offset: PHP)
  • 如何读R中的大数据集[复制](How to read large dataset in R [duplicate])
  • Unity 5 Heighmap与地形宽度/地形长度的分辨率关系?(Unity 5 Heighmap Resolution relationship to terrain width / terrain length?)
  • 如何通知PipedOutputStream线程写入最后一个字节的PipedInputStream线程?(How to notify PipedInputStream thread that PipedOutputStream thread has written last byte?)
  • python的访问器方法有哪些
  • DeviceNetworkInformation:哪个是哪个?(DeviceNetworkInformation: Which is which?)
  • 在Ruby中对组合进行排序(Sorting a combination in Ruby)
  • 网站开发的流程?
  • 使用Zend Framework 2中的JOIN sql检索数据(Retrieve data using JOIN sql in Zend Framework 2)
  • 条带格式类型格式模式编号无法正常工作(Stripes format type format pattern number not working properly)
  • 透明度错误IE11(Transparency bug IE11)
  • linux的基本操作命令。。。