Incidencia #41679

-finput-charset=cp437 completely glitches the result

Abrir Fecha: 2021-03-02 16:44 Última actualización: 2021-03-02 16:44

Informador:
Propietario:
(Ninguno)
Tipo:
Estado:
Open
Componente:
Hito:
(Ninguno)
Prioridad:
5 - Medium
Gravedad:
5 - Medium
Resolución:
Ninguno
Fichero:
Ninguno
Vote
Score: 0
No votes
0.0% (0/0)
0.0% (0/0)

Details

Here is the code I have, in a CP437 file.

  1. #include <iostream>
  2. int main(){
  3. std::cout << "\
  4. ÇüéâäàåçêëèïîìÄÅ\n\
  5. ÉæÆôöòûùÿÖÜ¢£¥₧ƒ\n\
  6. áíóúñѪº¿⌐¬½¼¡«»\n\
  7. ░▒▓│┤╡╢╖╕╣║╗╝╜╛┐\n\
  8. └┴┬├─┼╞╟╚╔╩╦╠═╬╧\n\
  9. ╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀\n\
  10. αßΓπΣσµτΦΘΩδ∞φε∩\n\
  11. ≡±≥≤⌠⌡÷≈°∙·√ⁿ²■ \
  12. ";
  13. }

When I use default settings, it properly makes it print the characters in the native codepage:

ÇüéâäůćçłëŐőîŹÄĆ
ÉĹĺôöĽľŚśÖÜŤťŁ×č
áíóúĄąŽžĘ꬟Ⱥ«»
░▒▓│┤ÁÂĚŞ╣║╗╝Żż┐
└┴┬├─┼Ăă╚╔╩╦╠═╬¤
đĐĎËďŇÍÎě┘┌█▄ŢŮ▀
ÓßÔŃńňŠšŔÚŕŰýÝţ´
­˝˛ˇ˘§÷¸°¨˙űŘř■ 

However, when I use -finput-charset=cp437 , it completely garbles the output.

├ç├╝├ę├ó├Ą├á├ą├ž├¬├ź├Ę├»├«├Č├ä├ů
├ë├Ž├ć├┤├Â├▓├╗├╣├┐├ľ├ť┬ó┬ú┬ąÔéžĂĺ
├í├ş├│├║├▒├Ĺ┬¬┬║┬┐ÔîÉ┬Č┬Ż┬╝┬í┬ź┬╗
ÔľĹÔľĺÔľôÔöéÔöĄÔĽíÔĽóÔĽľÔĽĽÔĽúÔĽĹÔĽŚÔĽŁÔĽťÔĽŤÔöÉ
ÔööÔö┤ÔöČÔöťÔöÇÔö╝ÔĽ×ÔĽčÔĽÜÔĽöÔĽęÔĽŽÔĽáÔĽÉÔĽČÔĽž
ÔĽĘÔĽĄÔĽąÔĽÖÔĽśÔĽĺÔĽôÔĽźÔĽ¬ÔöśÔöîÔľłÔľäÔľîÔľÉÔľÇ
╬▒├č╬ô¤Ç╬ú¤â┬Á¤ä╬Ž╬ś╬ę╬┤Գפć╬ÁÔłę
Ôëí┬▒ÔëąÔëĄÔîáÔîí├ĚÔëł┬░ÔłÖ┬ĚÔłÜÔü┐┬▓Ôľá┬á
Instead, the result should be the same as the default compiler result. I have nothing to do with UTF-8, it needs to get out of my way and does not belong in char type, I requested the compiler to do cp437 and it glitched. Because CP437 is already a fixed width char type, strings should pass the higher bytes directly to the byte stream, not garble them.

Ticket History (1/1 Histories)

2021-03-02 16:44 Updated by: piotrgrochowski
  • New Ticket "-finput-charset=cp437 completely glitches the result" created

Attachment File List

No attachments

Editar

Please login to add comment to this ticket » Entrar