mldonkey-bugs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Mldonkey-bugs] [bug #12608] file name is not incorrect for download


From: spiralvoice
Subject: [Mldonkey-bugs] [bug #12608] file name is not incorrect for download
Date: Mon, 11 Apr 2005 18:11:13 +0000
User-agent: Mozilla/5.0 (X11; U; Linux i686; de-DE; rv:1.7.6) Gecko/20050331 Firefox/1.0.2

Update of bug #12608 (project mldonkey):

                  Status:               Duplicate => None                   

    _______________________________________________________

Follow-up Comment #4:

Patch is in patch #3901
The code responsible for the conversion of UTF-8 characters to
"-" can be found in commonInteractive.ml
All characters which have ASCII codes > 127 or < 32 are replaced by "-":

let canonize_basename name =
  let buf = Buffer.create 100 in
  for i = 0 to String.length name - 1 do
    match name.[i] with
    | '/' | '\\' -> Buffer.add_char buf '_'
    | c ->
(* let remove all chars which are not in the basic ASCII set *)
        let nc = int_of_char c in
        try
          Buffer.add_string buf (List.assoc nc !!filename_conversions)
        with _ ->
            Buffer.add_char buf (
              match c with
                (* for Windows *)
                ':' | '*' | '?' | '"' | '<' | '>' | '|' | '%' -> '_'
              | _ ->
                  if nc > 127 || nc < 32 then '-' else c)
  done;
  Buffer.contents buf

    _______________________________________________________

Reply to this item at:

  <http://savannah.nongnu.org/bugs/?func=detailitem&item_id=12608>

_______________________________________________
  Nachricht geschickt von/durch Savannah
  http://savannah.nongnu.org/





reply via email to

[Prev in Thread] Current Thread [Next in Thread]