0
var urlRequest:URLRequest = new URLRequest("子系统.swf");
loader.load(urlRequest);
loader.contentLoaderInfo.addEventListener(Event.COMPLETE, onLoadComplete);

Everything works fine when i use native swf to load another swf. But after i embed my main swf to html, it reports error:

"NetworkError: 404 Not Found http://127.0.0.1:8020/huanmao/%D7%D3%CF%B5%CD%B3.swf"

I don't understand when does "子系统" become "%D7%D3%CF%B5%CD%B3", i can't find any charset option in UrlRequest. If i use English name instead of Chinese, the problem disappeared. This is my html charset setting

http-equiv="Content-Type" content="text/html; charset=utf-8"

All my files is edited in utf-8.

I'm really confused. This problem is killing me! Any help would be appreciated!!

Clifford
  • 88,407
  • 13
  • 85
  • 165
dedowsdi
  • 209
  • 2
  • 8
  • http://stackoverflow.com/questions/1794637/url-escaping-chinese-japanese-unicode-characters-for-internet-explorer and https://en.wikipedia.org/wiki/Internationalized_resource_identifier#Compatibility – SushiHangover Oct 10 '15 at 10:15

1 Answers1

0

Few years ago, I faced same issue.
If you are using tomcat, add these attributes at your 8020 port Connecter.(at server.xml)

URIEncoding="UTF-8"
useBodyEncodingForURI="true"

This is my settings.

<Connector port="8400" protocol="HTTP/1.1" 
               connectionTimeout="20000" 
               redirectPort="9400" 
               URIEncoding="UTF-8"
               useBodyEncodingForURI="true" />
Yasuyuki Uno
  • 2,417
  • 3
  • 18
  • 22