Version française
Home     About     Download     Resources     Contact us    
Browse thread
[Caml-list] How do I create files with UTF-8 file names?
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Yamagata Yoriyuki <yoriyuki@m...>
Subject: Re: [Caml-list] How do I create files with UTF-8 file names?
From: Mattias Waldau <mattias.waldau@abc.se>
Subject: [Caml-list] How do I create files with UTF-8 file names?
Date: Sat, 11 Sep 2004 11:01:05 +0200

> I have a filename as an UTF-8 encoded string. I need to be able to 
> handle strange chars like accents, Asian chars etc.
> 
> Is there any way to create a file with that name? I only need it on Win32.

On my Debian/Linux machine, I can make a file with a Japanese (EUC-JP)
name just like an ASCII named file.

# let c = open_out "\164\198\164\185\164\200";;
val c : out_channel = <abstr>
# output_string;;
- : out_channel -> string -> unit = <fun>
# output_string c "\164\198\164\185\164\200";;
- : unit = ()
# close_out c;;
- : unit = ()

$ ls
$B$F$9$H(B

Or am I missing something?

--
Yamagata Yoriyuki

-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners