I have the following SWIXML code:
<panel id="contentPanel">
<button text="∂"/>
<button text="∆"/>
<button text="∏"/>
<button text="∑"/>
</panel>
Notice the mathematical symbols that are used f开发者_高级运维or text. The symbols render fine in my Java IDE. However, when I run the code, the symbols are not displayed correctly in the Swing component. They each look like two characters, the first being an 'a' with diacritical marks and the second being some random character.
What is going on here?
YOu can use unicode char def e.g.
text="\u2211"
for Sum
The IDE's default encoding is probably UTF-8, while your platform is something else. Try examining the default encoding in both environments:
System.getProperty("file.encoding");
精彩评论