[bug #17618] Incorrect charset used for some locales

Gang Chen <[email protected]>
Newsgroups gmane.network.mldonkey.bugs
Message-ID <[email protected]>
Follow-up Comment #7, bug #17618 (project mldonkey):

The problem about tip is the filename are not converted to UTF-8 encoding
properly when it displayed in the tip window.
For example, in the src/daemon/driver/driverCommands.ml:

(Http_server.html_real_escaped (Filename.basename
impl.impl_shared_codedname))
...
(Filename.basename impl.impl_shared_codedname)

The codedname may not in UTF-8 if the system default encoding is not UTF-8, a
conversion is needed before print out the filename. I found the "shorten"
method did the conversion properly, so it will be a workaround by calling
shorten for filename before write to buffer.
For example:
(shorten (Http_server.html_real_escaped (Filename.basename
impl.impl_shared_codedname)) 999)
...
(shorten (Filename.basename impl.impl_shared_codedname) !!max_name_len)


    _______________________________________________________

Reply to this item at:

  <http://savannah.nongnu.org/bugs/?17618>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.nongnu.org/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.