如何修正编码

时间:2018-07-30 12:42:08

标签: java

enter image description here我正在使用下面的代码段,但是口音的打印方式错误。我已经为 -Dfile.encoding = UTF-8 配置了 JAVA_TOOL_OPTIONS ,并且在Eclipse IDE中,文本文件编码适用于UTF-8,但问题仍然存在。如果可能的话,我希望得到社区的帮助来解决这个问题。

Map<String, String> mapStatus = new HashMap<String, String>();

final String deviceInformation = String.format(
        "\nID: %1$s \nIP: %2$s \nPlataforma: %3$s \nVersão Firmware: %4$s "
                + "\nData Firmware: %5$s \nData Aplicativo: %6$s \nGMT: %7$s \nEmergência: %8$s \nLeitoras Habilitadas:"
                + " %9$s",
        deviceId, deviceIP, platform, versionFirmware, lastFirmwareUpdate, lastConfUpdate, gmt, emergency,
        readerBlock);               

    mapStatus.put("Informações do Dispositivo ", deviceInformation);
    deviceStatus.setStatus(mapStatus);

enter image description here

1 个答案:

答案 0 :(得分:0)

确保已在$ awk ' NR==1 { print; next } { key = ($2>$3 ? $2 FS $3 : $3 FS $2) } seen[key]++ { print orig[key] $0; delete orig[key]; next } { orig[key] = $0 ORS } ' file call_start_time called_no calling_no 43284.85326 1111111111 2222222222 43284.83205 2222222222 1111111111 的{​​{1}}部分中设置了<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />