Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/java/369.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Java Spring引导:头值编码_Java_Spring_Spring Boot_Character Encoding - Fatal编程技术网

Java Spring引导:头值编码

Java Spring引导:头值编码,java,spring,spring-boot,character-encoding,Java,Spring,Spring Boot,Character Encoding,如您所见,浏览器正在发送一个带有È字符内容的标题 我需要在服务中处理它: curl 'http://localhost:8080/userlogin' -H 'Accept-Encoding: gzip, deflate, br' -H 'GICAR: UNITAT_MAJOR=PRESIDÈNCIA' 输出为: LOG.debug("Default Cahrset: {}", Charset.defaultCharset().displayName()); String header

如您所见,浏览器正在发送一个带有
È
字符内容的标题

我需要在服务中处理它:

curl 'http://localhost:8080/userlogin'
  -H 'Accept-Encoding: gzip, deflate, br'
  -H 'GICAR: UNITAT_MAJOR=PRESIDÈNCIA'
输出为:

LOG.debug("Default Cahrset: {}", Charset.defaultCharset().displayName());
String headerValue = request.getHeader(EspaiDocConstants.Headers.GICAR_HEADER);
LOG.debug("Header value: {}", headerValue);
如您所见,
È
更改为
Ã


有什么想法吗?

尝试将此添加到curl命令中:

-H“charset=utf-8”

Default Cahrset: UTF-8
UNITAT_MAJOR=PRESIDÃNCIA