--- ocamldot.mll.orig
+++ ocamldot.mll
@@ -21,7 +21,7 @@
         let i = String.rindex s '.' in
         let s = String.sub s 0 i in
         let s = Filename.basename s in
-        let s = String.capitalize s in
+        let s = String.capitalize_ascii s in
         currentSource := s;
         processTargets lexbuf }
   | eof
@@ -40,7 +40,7 @@
         let i = String.rindex t '.' in
         let t = String.sub t 0 i in
         let t = Filename.basename t in
-        let t = String.capitalize t in
+        let t = String.capitalize_ascii t in
         addDepend t;
         processTargets lexbuf }
   | eof
