如何显示英镑(£)登录Java Swing? [英] How do I show the pound sterling (£) sign in Java Swing?
本文介绍了如何显示英镑(£)登录Java Swing?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
目前,我向Java源代码添加一个英镑(£)符号,并将生成的Swing组件编译为方形(不支持的字符)符号。
Currently, I add a pound sterling (£) sign to the Java source and compile the resulting Swing component shows as the square (unsupported character) symbol.
我怀疑它是一个编码问题,Java源文件编码为cp1252(Eclipse似乎默认为这个)。
I suspect it's an encoding problem, the Java source file is encoded as cp1252 (Eclipse seems to default to this). What's the correct way of resolving this?
推荐答案
使用\\\£表示法。其他示例此处的<
Use the \u00A3 notation. Further examples here for the unicodes Unicode code points for other symbols.
这篇关于如何显示英镑(£)登录Java Swing?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文