digitalmars.D.learn - Best way to convert between GBK/GB18030 to utf8 ?
- John Xu (3/3) May 22 2023 What is the best way to convert a GBK/GB18030 file contents,
- WebFreak001 (4/7) May 23 2023 I don't think we have any implementation of that encoding yet. If
- ryuukk_ (4/7) May 23 2023 https://github.com/lytsing/gbk-utf8/blob/master/utf8.c
What is the best way to convert a GBK/GB18030 file contents, i.e. read via: std.stdio.read(gbkFile).to!string , to utf8 encoding ?
May 22 2023
On Tuesday, 23 May 2023 at 02:58:21 UTC, John Xu wrote:What is the best way to convert a GBK/GB18030 file contents, i.e. read via: std.stdio.read(gbkFile).to!string , to utf8 encoding ?I don't think we have any implementation of that encoding yet. If you decide to make your own, don't forget to share it with the forum.
May 23 2023
On Tuesday, 23 May 2023 at 02:58:21 UTC, John Xu wrote:What is the best way to convert a GBK/GB18030 file contents, i.e. read via: std.stdio.read(gbkFile).to!string , to utf8 encoding ?https://github.com/lytsing/gbk-utf8/blob/master/utf8.c Here, it is C, but porting this to D is easy There is both implementation for windows/linux
May 23 2023