如何在 URL 中发送韩文字符? [英] How to send Korean characters in URL?
问题描述
我想将一些韩文值从页面 sumbit 上的 page1.html 发送到 page2.html.但是韩语字体正在被编码.任何人都可以帮助我.我在两个屏幕上都有这个元标记.
I want to send some Korean values from page1.html on page sumbit to page2.html. But the Korean fonts are getting encoded. Can any one help me with it. I have this meta tag in both the screens.
window.location.href = "page2.html?value='풍경' 这些韩文字符在少数移动设备中被编码.
window.location.href = "page2.html?value='풍경' these Korean character are getting encoded in few mobile devices.
对于这个页面,值被编码为
for this page the values is encode as
page2.html?value= %EC%82%EB%AC%BC
page2.html?value= %EC%82%EB%AC%BC
推荐答案
韩语字符(和任何其他非 URL 安全字符)为事务进行 % 编码.但是,当服务器收到并放入(例如)PHP 的 $_GET
数组时,它们会自动解码,因此您不必担心.
Korean characters (and any other non-URL-safe characters) are %-encoded for the transaction. However, when received by the server and put into (for instance) PHP's $_GET
array, they are decoded automatically so you don't have to worry about it.
这篇关于如何在 URL 中发送韩文字符?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!