Try to use urlencode
to encode your directory name:
$str = 'c:\\'.urlencode('表').'\t.txt';
$con=file_get_contents( $str);
echo $con;
This is described here in detail.
EDIT
Assuming you're using UTF-8 encoded source files, you could also try one of the following
$str = 'c:\\'.urlencode(mb_convert_encoding('表', 'UTF-16', 'UTF-8')).'\t.txt';
$str = 'c:\\'.mb_convert_encoding('表', 'UTF-16', 'UTF-8').'\t.txt';
As far as I know newer (> FAT32) Microsoft filesystems use UTF-16 encoding. But this will make your solution fail on other (e.g. Linux) filesystems.
EDIT 2
You can also try to convert your UTF-8 filename into a different encoding such as SJIS
, SJIS-win
, SJIS-2004
, JIS
, EUC-JP
, eucJP-win
, EUC-JP-2004
, CP932
, JIS-ms
or the like. But I'm not an expert in east asian character encodings - so treat that information with caution.
var_dump(is_file("c:\\\\表\\t.txt"), is_readable("c:\\\\表\\t.txt"));
to debug. – The Onin