OCaml中的`string`是否支持UTF-8? [英] Does `string` in OCaml support UTF-8?

查看:101
本文介绍了OCaml中的`string`是否支持UTF-8?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

OCaml中的类型string是否支持utf8?

Does the type string in OCaml support utf8?

或者我应该为utf8字符串使用哪个库?

Or what library I should use for utf8 string?

推荐答案

OCaml的string类型本质上由一系列8位字节组成.您可以将UTF-8值存储在字符串中,而我经常这样做.但是,没有内置的支持来处理它们. 甘菊.

The string type of OCaml consists of a series of 8-bit bytes in essence. You can store a UTF-8 value in a string, and I have often done this. However, there's no built-in support for handling them. A good library for handling Unicode in OCaml (so I've heard) is Camomile.

这篇关于OCaml中的`string`是否支持UTF-8?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆