Author Topic: Restrict editor to ASCII  (Read 294 times)

Offline DrOli

  • Multiple posting newcomer
  • *
  • Posts: 40
Restrict editor to ASCII
« on: June 25, 2017, 10:14:21 pm »
Is there a way to force the code editor to accept only ASCII or even better to convert all encodings to ASCII (as best that it can). 

The primary objective is to prevent fancy encoding to be accepted, say when copy/paste for a web page, and then having a compiler crash since  it does not accept fancy encodings (e.g. Fortran), and the throws some weird error messages that take a disproportionately (and unnecessary) huge time/expense to resolve.

Yes, I accept that means some "paste's" will "look ugly", or requiring "fixing", but that is MUCH PREFERRED.

I looked in Settings/Editor etc, but did not see anything obvious ... though I don't really know what many of the long list of encodings means.

Please advise

Cheers

Offline stahta01

  • Lives here!
  • ****
  • Posts: 5938
    • My Best Post
Re: Restrict editor to ASCII
« Reply #1 on: June 26, 2017, 12:53:28 am »
You might try the UTF-8 encoding and see if it works better than what encoding you currently have set.

The GCC Compiler uses UTF-8.

Tim S.
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 32 bit.
On Debian Testing, compiling CB Trunk against wxWidgets 3.0.2.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline BlueHazzard

  • Lives here!
  • ****
  • Posts: 1516
Re: Restrict editor to ASCII
« Reply #2 on: June 26, 2017, 09:47:45 am »
Settings->Environment->General settings->Encoding settings

and

Edit->File encoding