简体   繁体   English

如何在 C 中将 UTF-8 与 UTF-16 相互转换?

[英]How do I convert UTF-8 to/from UTF-16 in C?

Is there a library available, or do I need to design/code my own?是否有可用的库,还是我需要自己设计/编码?

The target platform is very old and the compiler does not provide wchar_t .目标平台很旧,编译器不提供wchar_t

No library is allowed, so plain C and headers will be appropriate.不允许任何库,因此简单的 C 和标题将是合适的。

Also you can try iconv() .您也可以尝试iconv() On some platform it's part of the C runtime.在某些平台上,它是 C 运行时的一部分。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM