开发者

How to save a character with a line above (like this ō) in a file system?

What file format should I use? It is for PHP to afterwards retrieve su开发者_如何转开发ch a character and for HTML to display.


You should be encoding the text as UTF8, then writing it to the file.

If you're doing this with PHP, then (I think) it'll be something like:

$f = fopen("/path/to/file", "w");
fwrite($f, utf8_encode($some_string));
fclose($f);

(although, this assumes that PHP is using Unicode internally… But, then, it might not – my memory is kind of hazy)

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜