小编use*_*241的帖子

使用JSTL fmt库和属性文件时,Tamil字符显示为问号

我正在使用JSTL fmttaglib来显示泰米尔语字符.但我无法显示任何泰米尔人的角色.它没有显示泰米尔语字符,而是显示问号字符??????.我试过印地语,它也显示了问号.我现在应该怎么做?

这是我的代码.我只是尝试在泰米尔语中打印Hello World.

fileproperty.properties:

helloworld=??????? ?????
Run Code Online (Sandbox Code Playgroud)

Hello.jsp:

<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org  /TR/html4/loose.dtd">
<html>
  <fmt:setLocale value="ta-IN"/>
  <fmt:setBundle basename="fileproperty"/>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <title>Home</title>
  </head>
  <body>
    <fmt:message key="helloworld"/>
  </body>
</html> 
Run Code Online (Sandbox Code Playgroud)

jsp jstl character-encoding tamil properties-file

6
推荐指数
1
解决办法
3751
查看次数

标签 统计

character-encoding ×1

jsp ×1

jstl ×1

properties-file ×1

tamil ×1