Java 在Intellij中使用testng时,带有上标字符的字符串不匹配,但使用Eclipse时匹配

Java 在Intellij中使用testng时,带有上标字符的字符串不匹配,但使用Eclipse时匹配,java,eclipse,selenium,intellij-idea,testng,Java,Eclipse,Selenium,Intellij Idea,Testng,我正在使用testng/Selenium/java,并尝试使用Intellij(我一直在使用Eclipse)。在使用IntelliJ时遇到了一个问题,在Eclipse中运行得非常好,我无法理解到底发生了什么 所涉及的线路是: sellunitcubeimpText = driver.findElement(By.id("sellUnitCubeImp_Label")).getText(); Assert.assertEquals(sellunitcubeimpText, Stri

我正在使用testng/Selenium/java,并尝试使用Intellij(我一直在使用Eclipse)。在使用IntelliJ时遇到了一个问题,在Eclipse中运行得非常好,我无法理解到底发生了什么

所涉及的线路是:

    sellunitcubeimpText = driver.findElement(By.id("sellUnitCubeImp_Label")).getText();
    Assert.assertEquals(sellunitcubeimpText, String.valueOf(df.format(Double.parseDouble(sellunitcubeText) * 35.3146667)) + "ft³");
IntelliJ中的sellunitcubeimpText显示为:“26.6096ftèè½”,这是不正确的。在Eclipse中,它正确地显示为:“26.6096ft³”

字符串的结果。valueOf。。。。在IntelliJ中显示为:“26.6096ft³”,如您所见,这是不正确的。然而,在Eclipse中,它再次正确地显示为“26.6096ft³”


为什么Eclipse正确地处理了这个字符串而IntelliJ没有?

他们使用不同的字体吗?考虑到这是一个失败的java函数,显示字体与此有关吗?也许我们需要屏幕截图?以下是IntelliJ:java.lang.AssertionError:Expected:26.6096ftï½Actual:26.6096ft³at org.testng.Assert.fail(Assert.java:94)at org.testng.Assert.failNotEquals(Assert.java:496)at org.testng.Assert.Assert.assertEquals(Assert.java:125)在org.testng.Assert.assertEquals(Assert.java:178)在org.testng.Assert.assertEquals(Assert.java:188)在com.ip.tests.StartQuote.testStartQuote(StartQuote.java:925)上