HTML:表单不发送 UTF-8 格式的输入 [英] HTML : Form does not send UTF-8 format inputs
本文介绍了HTML:表单不发送 UTF-8 格式的输入的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我已经访问了有关 HTML 中 UTF-8 编码的每个问题,但似乎没有任何事情使它像预期的那样工作.
我添加了 meta
标签:没有任何改变.
我在 form
中添加了 accept-charset
属性:没有任何变化.
JSP 文件
<%@ page pageEncoding="UTF-8" %><%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %><!DOCTYPE html><头><meta charset="UTF-8"/><meta http-equiv="Content-Type" content="text/html;charset=UTF-8"><title>Editer les sous-titres</title>头部><身体><form method="post" action="/Subtitlor/edit" accept-charset="UTF-8"><h3 name="nameOfFile"><c:out value="${ nameOfFile }"/></h3><input type="hidden" name="nameOfFile" id="nameOfFile" value="${ nameOfFile }"/><c:if test="${ !saved }"><input value ="Enregistrer le travail" type="submit" style="position:fixed; top: 10px; right: 10px;"/></c:if><a href="/Subtitlor/" style="position:fixed; top: 50px; right: 10px;">Retour à la page d'accueil</a><c:if test="${saved }"><div style="position:fixed; top: 90px; right: 10px;"><c:out value="Travail enregistré dans la base de donnée"/>
</c:if><表格边框=1"><c:if test="${ !saved }"><头><th style="weight:bold">原行</th><th style="weight:bold">翻译</th><th style="weight:bold">已翻译</th></thead></c:if><c:forEach items="${subtitles }" var="line" varStatus="status"><tr><td style="text-align:right;"><c:out value="${ line }"/></td><td><input type="text" name="line${ status.index }" id="line${ status.index }" size="35"/></td><td style="text-align:right"><c:out value="${lines[status.index].content }"/></td></tr></c:forEach></表单>