Issue #16753 has been updated by sevk (kk kk).


znz (Kazuhiro NISHIYAMA) wrote in #note-2:
> https://github.com/ruby/ruby/pull/2998



``` diff


--- filehandler.rb.old	2020-04-09 09:49:57.536780938 +0800
+++ filehandler.rb	2020-04-09 09:51:07.854878036 +0800
@@ -520,6 +520,7 @@
           s =  "<TR><TD class=\"name\"><A HREF=\"#{HTTPUtils::escape(name)}#{query if name.end_with?('/')}\">#{HTMLUtils::escape(dname)}</A></TD>"
           s << "<TD class=\"mtime\">" << (time ? time.strftime("%Y/%m/%d %H:%M") : "") << "</TD>"
           s << "<TD class=\"size\">" << (size >= 0 ? size.to_s : "-") << "</TD></TR>\n"
+          s.force_encoding 'ASCII_8BIT'
           res.body << s
         }
         res.body << "</TBODY></TABLE>"



```


----------------------------------------
Bug #16753: ruby -run -e httpd . -p 8080 ,  not support CJK directorys .
https://bugs.ruby-lang.org/issues/16753#change-84971

* Author: sevk (kk kk)
* Status: Open
* Priority: Normal
* ruby -v: ruby 2.7.0p0 (2019-12-25 revision 647ee6f091) [x86_64-linux]
* Backport: 2.5: UNKNOWN, 2.6: UNKNOWN, 2.7: UNKNOWN
----------------------------------------
httpd not support CJK directorys .



-- 
https://bugs.ruby-lang.org/

Unsubscribe: <mailto:ruby-core-request / ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>