如何解码特定字符集中的字符串,然后以UTF-8编码?

时间:2021-08-13 22:17:29

How, in Ada, do I decode a string coming from the MS Windows terminal, then encode it in UTF-8?

在Ada中,如何解码来自MS Windows终端的字符串,然后以UTF-8编码?

1 个解决方案

#1


Try looking in package Ada.Strings.UTF_Encoding.Conversions for UTF-handling.
As for retrieving text from the command-line you can use Ada.Command_Line, though there are also files/streams that you can use to get the standard input.

尝试查看包Ada.Strings.UTF_Encoding.Conversions以进行UTF处理。至于从命令行检索文本,您可以使用Ada.Command_Line,但也可以使用文件/流来获取标准输入。

#1


Try looking in package Ada.Strings.UTF_Encoding.Conversions for UTF-handling.
As for retrieving text from the command-line you can use Ada.Command_Line, though there are also files/streams that you can use to get the standard input.

尝试查看包Ada.Strings.UTF_Encoding.Conversions以进行UTF处理。至于从命令行检索文本,您可以使用Ada.Command_Line,但也可以使用文件/流来获取标准输入。