在下是个新手,输出法语字母遇到了问题
毕竟也是在dos下输出的,
我用了宽字符 wstring
我试过,用它储存日文啊,俄文,然后wcout都是可以显示的,
但是用它储存法语的特殊字母,é è à â ê û î ô ù ë的话
大部分是显示不出来的,请问 我如果想在dos下输出法语这些特殊字符,该怎么办好。
我已经setlocale(LC_ALL,"fra");
但还是不行啊
...全文
2486打赏收藏
如何输出法语字母
在下是个新手,输出法语字母遇到了问题 毕竟也是在dos下输出的, 我用了宽字符 wstring 我试过,用它储存日文啊,俄文,然后wcout都是可以显示的, 但是用它储存法语的特殊字母,é è à â ê û î ô ù ë的话 大部分是显示不出来的,请问 我如果想在dos下输出法语这些特殊字符,该怎么办好。 我已经setlocale(LC_ALL,"fra"); 但还是不行啊
French French (Belgian) "frb" or "french-belgian"
French French (Canadian) "frc" or "french-canadian"
French French (default) "fra"or "french"
French French (Swiss) "french-swiss" or "frs"
仅供参考
参考:
SetConsoleCP
The SetConsoleCP function sets the input code page used by the console associated with the calling process. A console uses its input code page to translate keyboard input into the corresponding character value.
BOOL SetConsoleCP(
UINT wCodePageID // code page to set
);
Parameters
wCodePageID
Specifies the identifier of the code page to set. The identifiers of the code pages available on the local computer are stored in the registry under the following key.
Return Values
If the function succeeds, the return value is nonzero.
If the function fails, the return value is zero. To get extended error information, call GetLastError.
Remarks
A code page maps 256 character codes to individual characters. Different code pages include different special characters, typically customized for a language or a group of languages.
To determine a console's current input code page, use the GetConsoleCP function. To set and retrieve a console's output code page, use the SetConsoleOutputCP and GetConsoleOutputCP functions.